Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    MYSQL




Unable To Insert Data (Error 1064)


I'm having problems with inserting data. When I try to insert data into the database manually, I get the Error 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)

If I use HeidiSQL to insert data it works just fine but does not work if I type in the query or if I copy the query generated by Heidi and execute it manually. This is creating problems for writing procedures. All other queries work fine.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
#1064 MySQL Error On Data Import
I know this has to be a simple problem, but it is driving me mad. PHPMyAdmin will allow me to import a SQL insert one line at a time no problem, but when I attempt to import more than one at a time it give me an error saying that my syntax is incorrect. I have tried to import the entire database and it just runs until the 300 sec time out. This wouldn't be so much of a problem to do it one line at a time, but my database is almost 4000 lines in length. Here is the error:

#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 'INSERT INTO `contact_images` VALUES (2,1,'alcohol_10.jpg')
INSERT INTO `contact' at line 2

PHP

CREATE TABLE `contact_images` (
`id` int(11) NOT NULL auto_increment,
`cat_id` int(11) NOT NULL default Ɔ',
`path` varchar(255) NOT NULL default '',
PRIMARY KEY(`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;


and here is a small example of what the data is:


PHP

INSERT INTO `contact_images` VALUES (1,1,'alcohol_1.jpg')
INSERT INTO `contact_images` VALUES (2,1,'alcohol_10.jpg')
INSERT INTO `contact_images` VALUES (3,1,'alcohol_11.jpg')
INSERT INTO `contact_images` VALUES (4,1,'alcohol_12.jpg')
INSERT INTO `contact_images` VALUES (5,1,'alcohol_13.gif')


Like I said, it will allow me to insert each line one by one.. but when I try to do more than one at a time it gives me the error. I have been searching around about the #1064 error and a lot of what I am reading seems to point at the CHARSET, I have tried multiple types of CHARSETS, but I just cannot figure out what the issue is with this.

I was told to try and import the entire database via SSH and that didn't work either.

I am running MySQL version 4.1.21 and PHPMyAdmin 2.8.2.4.

I must be totally missing the issue on this. Can anyone see a problem with me database structure/data?

LOAD DATA INFILE 1064 Syntax Error
I have an SQL script, which creates a new database and its (9) tables. At the end of this script, after the tables have been created, I try populate the 9 tables with data from 9 .CSV files using LOAD DATA INFILE. The following is the first couple of files:

LOAD DATA LOCAL INFILE 'C:/Test data/file1.csv'
INTO TABLE table1
FIELDS TERMINATED BY ';'
OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '
';

LOAD DATA LOCAL INFILE 'C:/Test data/file2.csv'
INTO TABLE table2
FIELDS TERMINATED BY ';'
OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '
';

LOAD DATA LOCAL INFILE 'C:/Test data/file3.csv'
INTO TABLE table3
FIELDS TERMINATED BY ';'
OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '
';

but when I try this, I get the 1064 "You have an error in your SQL syntax..." error

No, my I have figured out, that if I only have one LOAD DATA INFILE command, for example, to populate table1, then it works fine, but when I try two or more LOAD DATA INFILE commands, I get the syntax error. Now, this seems to me that MySQL cannot handle more than one LOAD DATA INFILE command within a single script, am I correct in this, or have I just done something wrong. If I am right, what can I do to get around it, so I can populate multiple tables from the LOAD DATA within a script.

Error On Update Or Insert Data But No Message
I have an application on asp and mysql 5.0, connecting with ODBC 3,51. When the application insert data or update data, MySql don't send error message, but the data don't update or insert. The transaction is ignored!!!!. Then, on my application I can't detect error. My code:

set Command1 = Server.CreateObject("ADODB.Command")
Command1.ActiveConnection = MM_base_STRING
Command1.CommandText = "UPDATE EXAM SET MaAnt='"&MaAnt&"',Mois='"&Mois&"',Annee='"&Annee&"',[...]WHERE Id_Exam='"&id&"'"
Command1.CommandType = 1
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Execute()

Have anybody an idea?

Unable To Update And Insert
I have a weird problem which is i able to access to the DB, able to do a select but unable to update and insert.
This is the scenario.
The existing running db is called as 'abc'. I dump it out and the i restore it as 'abcv2' and add in few column and insert value in. Then my application able to access the db. Able to do a select but unable to perform insert and update. No error is show in my application. Application wise i not the problem as it able to do so with others db.
I suspect is the privileges problem therefore i create a user and grant all access to that user. But the same thing as unable to update and insert.
Any idea of my problem? I think if i change the database name from a dump file won't cause this problem right.
What i can do now is i get the dump file then i open it with notepad and do the necessary changes. This is working fine but i would like to know what is the cause for this problem.

Create Table Error. #1064 - You Have An Error In Your SQL Syntax; Check The Manual That Corresponds
I have been trying to create two tables with the SQL below. I have the SQL in file and tried to import it to PhpMysqlAdmin in my control panel. The wierd thing is that the first table gets created while the second one is not created and error is thrown instead. The error message is

#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 ....

Error 1064 Restoring PhpMyAdmin Dump (error On Foreign Key Clause)
I am getting an Error 1064 when I try to restore a dump I created using phpMyAdmin from an online database into a newly created database on my home system.

The error points to a section of the dump file that adds foreign key constraints.

I've already disabled the foreign key checks. The problem seems to occur only with tables in which I have more than one foreign key.

The dump file foreign key constraint section looks very odd to me because multiple ALTER TABLE statements to add foreign keys are separated only by commas, not semi-colons, and even weirder, each time a new statement to add a foreign key constraint is created, it is then repeated in the creation of the next foreign key constraint. Code:

MySQL Error, #1064 - You Have An Error In Your SQL Syntax.
I was adding a table in phpMyAdmin and when i clicked on go it produced this SQL CREATE

TABLE `pm` (
`to` VARCHAR( 30 ) NOT NULL ,
`from` VARCHAR( 30 ) NOT NULL ,
`message` BLOB( 25000 ) NOT NULL ,
UNIQUE (
`to` ,
`from`
)
)
and this error
MySQL said:

#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 '(25000) NOT NULL, UNIQUE (`to`, `from`))' at line 1

SQL Error : 1064
I am using a phpbb forum on phpnuke template, i recently upgrated to a new version, but i get an error code when i try to access my forums:

phpBB : Critical Error

Could not query database for theme info

DEBUG MODE

SQL Error : 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 '' at line 3

my question is: what could be wrong here, and where can i find LINE 3? and is it normal that the place between the two " are empty?

Error #1064
This is my query:

CREATE TABLE `cemoisci_gauche_fr` (
`cemoisci` longtext NOT NULL ,
`num` text NOT NULL ,
FULLTEXT KEY `cemoisci` ( `cemoisci` ) ,
) TYPE = MYISAM

And mySQL answers:

#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 ') TYPE=MyISAM' at line 5

Error 1064
I have acquired an application that uses PHP and mySQL (MailMachinePRO) to manage my mailing lists. My WEB host is 1and1.com and thru them I have access to mySQL. I have setup the application as directed by the vendor of the software (and he indicates it IS setup properly). I am able to setup NEW mailing lists with no indication from mySQL that there is any issues.

When i go to update an existing entry in mySQL I receive the following error:

"Query Error
ErrorNumber: 1064
Error Description: 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 '' at line 1"

Please not the absence of any code in error being displayed between the QUOTES....

Thank you for any assistance you can provide.

Application vendor has indicated that they have done all they can do to figure out why this is happening. By posting here I am hoping someone can point out possible problem areas that I can in turn pass on to the application vendor!

Error 1064
I'm using phpMyAdmin to build a new db for a site I'm fiddling with.Had it set up at a friend's house, he dumped the MySQL db into a text file.When I go to load it through phpMyAdmin, I'm getting the following:

#1064 - You have an error in your SQL syntax near 'ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ' at line 16

for this code:

SQL Error #1064
I have just moved from a windows server to a linux server. It came with plesk, mysql, and a few other modules. However, when I try to import my databases, I get a #1064 which is "You have an error in your SQL syntax near 'DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci' at line 12".

I am using phpmyadmin to import them. I know one of them does not have a problem with linux because I used it before on linux.

Error 1064
I am trying to migrate from one PHP/MySQL environment to another (on the same host) and although everything worked perfectly on the old environment, in the new environment most pages crashe with error code 1064. Where do I find out what that means?

Error 1064
currenlty my pc is using a Mysql5.0, but my host site pc is using a MySql 4.0.16

my statement consist of this

select * from table_1 where id != all (select id from table_2);

in mysql4.0.16, it throws back a Error #1064 coz i am not suppose to use a reserved word, from ' all(select id from table_2);'

what i am trying to do is that i want to return a result of all rows in table_1 except for all those that have been used in table_2

Error #1064
I am using MySQL version 4.0.25-standard

and get the error message

#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 'SELECT seat_ref_no FROM booking , seat_booking WHERE booking

when i run the following qurie:

SELECT stand_desc, section, row, seat_no
FROM seat ,stand_name
WHERE seat.stand_ref = stand_name.stand_ref
AND seat_ref_no NOT IN (SELECT seat_ref_no
FROM booking , seat_booking
WHERE booking.booking_no = seat_booking.booking_no
AND event_date = '2005-08-28');

Anyone got any ideas?

ERROR 1064
i tried to import a database to phpmyadmin and i got this error

ERROR 1064 at line 20: 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 'ENGINE=MyISAM DEFAULT CHARSET=latin1' at line 6

Error 1064 ???
I have this sql which creates a procedure, unfortunatelly I keep getting the dreaded 1064 error, but I have not idea why, can anybody enlighten me please?

CREATE PROCEDURE pAdminLogin (
IN uname varchar,
IN upass char(32),
IN force bool default 0,
OUT admin_id smallint
)

BEGIN
SELECT
id
FROM
tadminuser
WHERE
username = uname AND
pwrd = upass
INTO
admin_id;
END;

Error 1064
I'm trying to create a table but i get the following error:

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 ....

Error #1064
i am trying to create a simple table create table t (a number (2));
i get the error #1064
does anyone know why?

Error 1064
I have this query
Code:
LOAD DATA LOCAL INFILE "/var/www/html/uploads/dnc/IL.txt" into table TempDNC(Phone) field terminated by ',';
here's the data format
5555555555,6666666666 and so on, no linebreaks
I keep getting [nativecode=1064 ** You have an error in your SQL syntax

Error 1064
iエm having some troubles with some code of mine. iエve been searching around for a while, but i only found answers to specific problems. so i thought i could post mine as well:
this is my code:

$sql[pm_read] = "update cl_pm set read = '1' where timestamp = '$timestamp'";
mysql_query($sql[pm_read]);

and this is the errorcode i get:

1064: You have an error in your SQL syntax near 'read = '1' where timestamp = '1098542048'' at line 1

read is an int field of lenght 1 and timestamp is varchar of lenght 14

Error 1064
I made a dumped data from V4.1.11 with different characterset and made another database to restore the dumped data but have an "Error 1064" message.
What does it mean and why does it occur?

Error 1064
I'm close to desparate. Im coming from Oracle side where you get proper error message at the right place. Now I tried as newbie to create a Stored Procedure inside the MySQL console. Independent of variable type it always gives me an error message after declaring the first variable. Example from console:

mysql> CREATE PROCEDURE stockLink()
->
-> BEGIN
->
-> DECLARE currentCount INT;
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 'INT' at line 1
mysql>

I'm working with MySQL 5.0.18-standard on Mac OSX (latest version).

SQL Error : 1064
this is the error that I keep getting
SQL Error : 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 ' 1)' at line 2

INSERT INTO nuke_bbauth_access (forum_id, group_id, auth_mod) VALUES (9, , 1)

Line : 425
File : /public_html/modules/Forums/admin/admin_ug_auth.php

what do I need to change

ERROR 1064: You Have An Error In Your SQL Syntax Near
Now this is odd. I'm running mysql Ver 12.22 Distrib 4.0.18, for apple-darwin6.8 (powerpc) right?

And I can't get any subquery to work. I even tried :

SELECT (SELECT 1);
and I still get

ERROR 1064: You have an error in your SQL syntax near 'SELECT 1)' at line 1

ERROR 1064: You Have An Error In Your SQL Syntax
I am getting error while executing below Query. I have these two tables and working in individual queries. I need to combine and get the the data.

SELECT DLVRY_PORT FROM TENDER WHERE DLVRY_PORT IN
( SELECT PORTID FROM SUPPLIER_PORT WHERE userid = 'sammil' )

Error:

[root@localhost:3306] ERROR 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 'SELECT PORTID FROM supplier_port WHERE userid = 'sammil')'

Mysql 1064 Error?
sorry to make my first post a question, but i am just puzzled at this error and have been trying just about everything to make it go away, and i just can't get it done. I have tried putting ` ticks in, // blocking the ip line, etc.....I went to as many mymsql threads as possible and even did a search here before posting my question, and i am just dumb founded. Any help on this would be greatly appreciated.....And i am on MySQL - 4.1.21-standard.

anyways, here is the error:

Quote:

Database error in vBulletin 3.6.0:

Invalid SQL:
INSERT INTO vb3 `session` (`userid`,`lastactivity`,`host`) VALUE (飅',1159372455,飗.0.0.1');

MySQL Error : 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 'session` (`userid`,`lastactivity`,`host`) VALUE (飅',1159372455,飗.0.0.1')' at line 1
Error Number : 1064

and here is where i think the bad line is at, but this is only a guess on my part:

PHP

$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "session SET lastactivity = '". TIMENOW ."' WHERE (userid = '".$vbulletin->options['ewt_talkerbot_botuid']."')");
if ($vbulletin->db->affected_rows() == 0)
{
$ip = 飗.0.0.1'
$vbulletin->db->query_write("INSERT INTO " . TABLE_PREFIX . " `session` (`userid`,`lastactivity`,`host`) VALUE ('" . $vbulletin->options['ewt_talkerbot_botuid'] . "'," . TIMENOW . ","$ip")");
}

$userdata =& datamanager_init('User', $vbulletin, ERRTYPE_STANDARD);
$userdata->set_existing($botinfo);
$userdata->set('lastactivity', TIMENOW);
$userdata->set('lastvisit', TIMENOW - 1);
$userdata->save();

and


PHP

$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "session SET lastactivity = '". TIMENOW ."' WHERE (userid = '".$vbulletin->options['ewt_talkerbot_botuid']."')");
if ($vbulletin->db->affected_rows() == 0)
{
$ip = 飗.0.0.1'
$vbulletin->db->query_write("INSERT INTO " . TABLE_PREFIX . " `session` (`userid`,`lastactivity`,`host`) VALUE ('" . $vbulletin->options['ewt_talkerbot_botuid'] . "'," . TIMENOW . ","$ip")");
}

$userdata =& datamanager_init('User', $vbulletin, ERRTYPE_STANDARD);
$userdata->set_existing($botinfo);
$userdata->set('lastactivity', TIMENOW);
$userdata->set('lastvisit', TIMENOW - 1);
$userdata->save();

}

#1064 - You Have An Error In Your SQL At Line 1
Not sure what is going on here. I'm moving a php app, which I do all the time, and so I pulled down the mySQL, and am running it on the new DB, but I get this error.

The SQL comes from phpMyAdmin 2.6.4-pl1 and is going into phpMyAdmin 2.6.4-pl2.

===================
THE FULL ERROR
===================
#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.6.4-pl1
-- http://www.phpmyadmin.net
-' at line 1

#1064 - You Have An Error In Your SQL Syntax.
I'm famililar with other DB systems, but for some reason am having a
problem with the simplest of queries.....

SELECT *
FROM table1
WHERE famc NOT
IN (
SELECT familyID
FROM table2
)

Why isn't this working?? I'm on version 4.0.25 something....I get

#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..............

According to mysql docs it's supposed to work....
http://dev.mysql.com/doc/refman/4.1...subqueries.html

Error 1064: Sql Syntax
Error 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 'Test LOOP

set @counter = @counter + 1

INSERT INTO student VALUES (@cou' at line 2

I have tried changing every line

#code starts here
#declare @counter int default 0

set @counter =0

Test LOOP

set @counter = @counter + 1

INSERT INTO student VALUES (@counter,"Andreasa","Morris","andreasa_m@hotmail.com",19)

if @counter == 10 then LEAVE Test

end if

END LOOP
# saved as inserting.sql

Error 1064 (42000)
the exact error is "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 '' at line 1"

i am new at this kind of thing. im using phpbb and myql database server 4.1.8 in windows server 2003.

i am tryin to create tables by using the following syntax

CREATE TABLE example (username VARCHAR(30); i have also left a space between VARCHAR and (30). i dont have the slightest clue as what im doing this is my first time EVER using this software.

ERROR 1064 (00000)
I seem to be having some syntax issues with my SQL script. The error I get is as followed:

ERROR 1064 (00000): 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 'User(Email)

My SQL File contains the following: Code:

Error 1064 On Select
I'm using:

MYSQL version 4.1.7
xampp 1.4.13
PHP 5.0.4
apache 2.0.53

my OS is windows xp SP2

My problem is:

i have a field with progressive integers, and i need to increase it by php. So i thought to take the max and then do "max + 1".
But when i do

SELECT MAX (idthread) FROM learning_forumthread

i take this error:

#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 '(idthread) from learning_forumthread' at line 1

i tried with select min and select count ... and i got the same error. But when i tried with select avg (idthread) ... it worked perfectly. It's very very strange for me! I need to take the last record of that field. Can you give me a solution??

MySQL 4.1.15 And Error 1064
I'm trying to set up a survey with a 3rd party tool, which delivers a comfortable install tool for my survey.

Starting this install.php on my server, at first everything goes fine... the tool report a connection with the db and tries now to create the need tables within the db.

And then this error message appears:

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /is/htdocs/wp1019332_6FJV867SBW/www/umfrage/install.php on line 37

Code:

1064 - You Have An Error In Your SQL Syntax.
I am getting this error on my web site that is developed with osCommerce php code.

It appears to be replacing ' with '

I am not sure if it is the ocCommerce php code that is causing the problem or MYSQL itself.

This is the full error - has anyone seen anything like this before. Code:

ERROR 1064 (42000)
I am trying to write a script and am constantly getting ERROR 1064 errors.
CREATE DATABASE sms; doesn't even work. Can someone please tell me why?

MySql 1064 Error
Can anyone give me advice on how to resolve the following error message ive had a look through the internet for some advice but find the information confusing.

Ive being using MySql version 4.1.10

Ive updated the previlages and it seems to have no effect.

Ive created tables before on phpmyAdmin 2.6.1
But ive suddenly got the following error message

#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 '10.2) NOT NULL, `image_file_1` VARCHAR(50), `image_file_2` VARCHAR(50), `on_cata' at line 1

The MySql for creating the table is as follows Code:

Error 1064 When Using DISTINCT
Alright, I am working through a tutorial for SQL that demonstrates the DISTINCT function. I copy the example into MySQL word for word and I get error 1064. I'm stumped and I can't find the syntax error. I'm sure its obvious but I don't have the expertise to find it! I'm running MySQL 4.1 on a laptop runnng Fedora Core 3. Below is the exact code and error message.

mysql> SELECT AVG(DISTINCT prod_price) AS avg_price
-> FROM Products
-> WHERE vend_id='DLL01';
ERROR 1064: You have an error in your SQL syntax near 'DISTINCT prod_price) AS avg_price
FROM Products
WHERE vend_id='DLL01'' at line 1

Count Error 1064
i have a problem whith the querries that use count command, even "select count (*) from tablename, it returns me an error.

I have read that i have to change the column tipe to smallint, and doesnt work. Anyone please know something?

MySQL Error #1064
I am creating a php/javascript based website that uses a MySQL database.
When running at Apache server 1.3.29 (PHP 4.3.6, MySQL 4.0.18) served locally from my own PC it works fine. When uploaded to an Apache server 1.3.34 (PHP 4.4.1, MySQL 4.0.25 standard) I receive errors #1064 all the time when trying to insert, update or delete from database.

The type of syntax I use are:

INSERT INTO tablename SET colname1='value1', colname2='value2', colname3='value3'

or

UPDATE tablename SET colname='newvalue' WHERE colname2='value'

or

DELETE FROM tablename WHERE colname='value'

#1064 - You Have An Error In Your SQL Syntax.
I have getting a error message like following in my Linux web server. My MySQL version is 4.0.25-standard. I am a newbie so is anyone can help me with this please.

The code is

SQL query:
-- phpMyAdmin SQL Dump
-- version 2.6.4
-- http://www.phpmyadmin.net

-- テ青。テ鯛堙鯛ぎテ柁津青コテ鯛堙柁津鯛ぎテ青ー テ青ステ青ー テ鯛堙青ーテ青アテ青サテ青クテ鯛テ青ー `b2categories`
--
CREATE TABLE `b2categories` (
`cat_ID` int( 4 ) NOT NULL AUTO_INCREMENT ,
`cat_name` tinytext NOT NULL ,
KEY `cat_ID` ( `cat_ID` )
) ENGINE = MYISAM DEFAULT CHARSET = latin1 AUTO_INCREMENT =2


The error message I am getting is
MySQL said: the hyperlink to see from MySQL site is http://dev.mysql.com/doc/mysql/en/Error-returns.html
#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 'DEFAULT CHARSET=latin1 AUTO_INCREMENT=2' at line 23

Error 1064 (42000)
I am trying to make a registration page for my site. I try to make a table called users, here is what I put in it:

CREATE TABLE users
(
usersID INT NOT NULL AUTO_INCREMENT ,
PRIMARY KEY (usersID) ,
firstname varchar (25) ,
username varchar (35) ,
password varchar (12) ,
email varchar (45) ,
gamertag varchar (21) ,
gender varchar (6) ,
) ENGINE = MYISAM ;

I get this error "ERROR 1064 (42000): 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 ') ENGINE = MYISAM' at line 11"

Do I have to download or set up something for the MYISAM Storage Engine to work or something?

Error 1064 In A View
it's first time I use MySQL... after setting up the server I tried to insert tables, works fine and a view... but this does not really work. The view itself looks like this:

--
CREATE OR REPLACE VIEW `sql2'.'test`
AS SELECT
tbl_artikel.ID, tbl_artikel.Datum, tbl_artikel.LiefNr,
tbl_artikel.ArtNr, tbl_artikel.KT1, tbl_artikel.KT2,
tbl_artikel.Menge, tbl_artikel.Einh, tbl_artikel.EP
FROM tbl_artikel
ORDER BY tbl_artikel.ArtNr;
--

by executing this view I got the error:
MySQL Error Number 1064
You have an error in you SQL syntax check the manual that corresponds to you MySQL server version for the right syntax to use near 'OR REPLACE VIEW `sql2'.'test`
AS SELECT
tbl_artikel.ID, tbl_artikel.Datum, tb' at line 1

I looked for the error number but without real success.

1064: Syntax Error
I want to execute a simple request SQL on the MySql shell,

On DB2 and solid this line work perfectly, but under mySql i get an error.

This is the error:

ERROR 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 'exists (SELECT Table_2.Tab1ID FROM Rdv WHERE Table_2.Tab1ID = 1


This is the line to execute:

DELETE FROM Table_1 WHERE ((Table_1.ID = 123456) AND not exists (SELECT Table_2.Tab1ID FROM Rdv WHERE Table_2.Tab1ID = 123456));

Error 1064 During Import
I'm transferring my mySQL db to a web hosting server via phpMyAdmin and I'm getting the 1064 syntax error. I tried everything and finally found that this was the probllem in the generated SQL...

MYISAM DEFAULT CHARSET = latin1

If I remove that line from every table it imports OK, otherwise I get the error. I asked the hosting co. about this and they thought that it might be due the the fact they we have different versions of mySQL. I have 4.1.7 and they have 4.0.22. I also noticed a difference in the phpMyAdmin screen for viewing a table... at the bottom where it says "Location of the textfile:" I see the following.. "Character set of the file [utf8] (where utf8 is a pull-down menu). I don't see this on the hosting co's phpMyAdmin running mySQL v4.0.22.I just wondered if anyone has noticed this and is this version difference the reason for the problem? Also, is there any other fix other than manually deleting this MYISAM DEFAULT CHARSET = latin1 from each table in the SQL.

"ERROR 1064 (42000): You Have An Error In Your SQL Syntax " When Trying To Import Backup
Just upgraded to the latest version of mySQL. Before I did that, I did a full backup of all tables using the Administrator tool. Now when I try to do a restore, I get the message in the subject. Even if I copy-paste the SQL code into the command line client, I get the error. For example, I use this code:

CREATE TABLE "news" (
"news_id" int(4) NOT NULL auto_increment,
"news_subject" varchar(96) NOT NULL default '',
"news_author" varchar(96) NOT NULL default '',
"news_email" varchar(96) NOT NULL default '',
"news_body" longtext NOT NULL,
"news_time" int(10) NOT NULL default '0',
PRIMARY KEY ("news_id")
) TYPE=MyISAM DEFAULT CHARSET=latin1;

And I get this error:

ERROR 1064 (42000): 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 '"news
" (
"news_id" int(4) NOT NULL auto_increment,
"news_subject" varchar(96' at line 1

Error 1064 (42000) In Your SQL Syntax
I'am working in kevin yanks book. It seems to be a good one but,for some reason I can't seem to get passed this part. I've worked on it for couple of days now and still can't figure out why I keep getting this error.

Here's my table:

+----------+--------+-------+-----+--------+----------------+
| Field |Type | Null |Key |Default |Extra
+-----------------------------------------------------------+
| id | int(11) | no |pri | null |auto_increment
| joketext | text | yes | | null |
| jokedate | date | no | |
+----------+--------+-------+-----+--------+----------------+


Here's my

mysql> INSERT INTO joke SET
->joketext="Why did the chicken run?To get
">away!"
->jokedate="2006-11-10";


Here's the erorr:

Error 1064 (42000) in your SQL syntax

Get A 1064 Error When I Try To Restore A Backup
I am migrating my website from 1 server to another the versions of MySQL are as follows

Old Server 4.1.14-standard

New Server 4.0.25-standard

I am restoring a Wordpress SQL backup using MyPHPAdmin version 2.6.4-pl2

and get the following error each time I try to restore

Error

SQL query:

CREATE TABLE `ajones_Counterize` (
`id` int( 11 ) NOT NULL AUTO_INCREMENT ,
`IP` varchar( 16 ) NOT NULL default 'unknown',
`timestamp` datetime NOT NULL default '0000-00-00 00:00:00',
`url` varchar( 255 ) NOT NULL default 'unknown',
`referer` varchar( 255 ) NOT NULL default 'unknown',
`useragent` text,
PRIMARY KEY ( `id` )
) 'ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=10911'

MySQL said: Documentation
#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 ''ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=10911'' at

UNION QUERIES And Error 1064
PROBLEM:
Using Access front end with MySQL back end. All my UNION QUERIES fail with Error #1064.

ACTION TAKEN:
When I remove one line, the query executes without an error; but with 3 lines or more it fails. This appears to be a systemic error, since no matter what line is removed, the second or the third; with 2 lines the UNION works, but with 3 it fails.

BUG:


Copyright ゥ 2005-08 www.BigResource.com, All rights reserved