#1064 - You have an error in your SQL syntax;

General questions relating to Joomla! 1.5 There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Cindymcq
Joomla! Apprentice
Joomla! Apprentice
Posts: 30
Joined: Thu Nov 20, 2008 5:40 pm

#1064 - You have an error in your SQL syntax;

Postby Cindymcq » Mon Oct 05, 2009 3:43 am

Hi There, I have searched the forums and found other posts similar to my problem but none of the suggestions have helped.
I'm stumped:
Exported the database using phpmyadmin version 2.10.1 my sql is version 5, the new database is version 5 and I get the following error:

SQL query:

-- phpMyAdmin SQL Dump
-- version 2.10.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Oct 04, 2009 at 03:53 PM
-- Server version: 5.0.45
-- PHP Version: 5.2.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-- phpMyAdmin SQL Dump
-- version 2.10.1
-- http://www.phpmyadmin.net
--
-- ' at line 1


Now the only thing I changed was I removed the 'create database' because i can't create with my server, it's created for me. here is the first line of my sql:

-- phpMyAdmin SQL Dump
-- version 2.10.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Oct 04, 2009 at 03:53 PM
-- Server version: 5.0.45
-- PHP Version: 5.2.5

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

--
-- Database: `dbhutch`
--

USE `dbhutch`;

--

Can you see anything wrong with this? I have been doing the same thing for all my sites and never have I had this error. Very Frustrating! I have spent 2 hours on this!

surendar
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Tue Jun 30, 2009 1:12 pm

Re: #1064 - You have an error in your SQL syntax;

Postby surendar » Mon Oct 05, 2009 10:01 am

Hi,

What you did, exported from database in zipped or none format,

you can try like this, if export value in none format you will get the queries, in that
please note the line
" ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;"
remove this line in all the create table queries and copy and paste it in the sql section of your new database,
there might be some other option instead of removing all these, but no ideal about that,
this is a try,

regards,
http://www.joomla-web-designer.com Joomla Custom Template Design
http://www.joomla-web-developer.com Web Redesign Services, Joomla CMS development, Ecommerce, Maintenance


Return to “General Questions/New to Joomla! 1.5”

Who is online

Users browsing this forum: Yahoo [Bot] and 10 guests