Syntax error in query

Syntax error in query

Postby aabudara » Wed 19 Jul 2006 01:46

I have the following table in my application:

CREATE TABLE products (
products_id INT(11) NOT NULL AUTO_INCREMENT,
products_quantity INT(4) NOT NULL default '0',
products_model VARCHAR(38),
products_image VARCHAR(64),
products_price DECIMAL(15, 0) NOT NULL default '0.0000',
products_date_added DATETIME NOT NULL default '0000-00-00 00:00:00',
products_last_modified DATETIME,
products_date_available DATETIME,
products_weight DECIMAL(5, 0) NOT NULL default '0.00',
products_status TINYINT(1) NOT NULL default '0',
products_tax_class_id INT(11) NOT NULL default '0',
manufacturers_id INT(11),
products_ordered INT(11) NOT NULL default '0',
default_supplier_code VARCHAR(32),
default_supplier_cat_no VARCHAR(38) NOT NULL default '0',
default_cost_price DECIMAL(15, 0) NOT NULL default '0.0000',
default_price_code INT(4) NOT NULL default '0',
date_originally_added DATETIME default '0000-00-00 00:00:00',
reorder TINYINT(1) NOT NULL default '0',
unc_barcode VARCHAR(38) NOT NULL default '0',
create_in_process TINYINT(4) NOT NULL default '0',
article_id VARCHAR(54),
times_restocked INT(11) NOT NULL default '0',
last_quantity_uploaded INT(11) NOT NULL default '0',
alternative_cat_no VARCHAR(38),
check_for_reorder TINYINT(1) NOT NULL default '1',
PRIMARY KEY (products_id),
INDEX idx_products_date_added USING BTREE (products_date_added)
)
AUTO_INCREMENT=21372
CHARACTER SET latin1 COLLATE latin1_swedish_ci;


It seems that there is a problem with check_for_reorder column, because if I do the following query:

SELECT check_for_reorder
FROM Products

SQL2.sql: Error (1,1): 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 'for_reorder
from products' at line 1

And this does not happen with other fields. What can be happening ?


Thank you for your answers.

Regards,
Alberto Abudara.
aabudara
 
Posts: 3
Joined: Wed 19 Jul 2006 01:31

Postby Alexey » Wed 19 Jul 2006 06:56

We do not experience such problem. What version of MySQLDirect do you use? Download the latest one and try it.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43


Return to dotConnect for MySQL