Jump to content

1064: You have an error in your SQL syntax;


Guest

Recommended Posts

I fresh installed cubecart v3, on freebsd 4.8 with mysql 4.x php5

everything works fine, administration panel just great..

but when I go for the store webpage www.mystore.com/upload

it gives this error..

MySQL Error Occured

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 1

QUERY = SELECT productId, image, price, name, sale_price FROM CubeCart_inventory WHERE `showFeatured` = 1 ORDER BY productId DESC LIMIT

Anyhelp is appreciated please.

Thanks

Link to comment
Share on other sites

I had this problem before when one file was missing, it seem that the variable used to set the LIMIT is empty... try uploading all files other than you Global.inc.php and Home.inc.php files...

Link to comment
Share on other sites

I had this problem before when one file was missing, it seem that the variable used to set the LIMIT is empty... try uploading all files other than you Global.inc.php and Home.inc.php files...

there is no missing files ;)

and smae sql problem

MySQL Error Occured

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 1

QUERY = SELECT productId, image, price, name, sale_price FROM CubeCart_inventory WHERE `showFeatured` = 1 ORDER BY productId DESC LIMIT

Link to comment
Share on other sites

in your admin area make sure that you have set the number of latest products, as that seems to be whats missing, why its empty though i dont know...

Same :-(

I tried to update all the settings, I changed the number of latest products to 0, 1, 2 and 3, I added products and tried almost everything from the settings.. still giving same error.

I even installed the cubecart again, and the same error again..

I deleted all the data, and created again, but the same error!

Any ideas?

;)

MySQL Error Occured

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 1

QUERY = SELECT productId, image, price, name, sale_price FROM CubeCart_inventory WHERE `showFeatured` = 1 ORDER BY productId DESC LIMIT

Link to comment
Share on other sites

Im all out of ideas save deleting EVERY thing downloading CC3.0.6 again from cubecart.com (as errors can accure durring download) Re-upload all the new files and install...

If it still doesn't work then ill be damed...

Link to comment
Share on other sites

Im all out of ideas save deleting EVERY thing downloading CC3.0.6 again from cubecart.com (as errors can accure durring download) Re-upload all the new files and install...

If it still doesn't work then ill be damed...

I did downloaded again, setup everything again, and everything works fine, except this user home page error... giving always the same error...

im really disappointed..

Link to comment
Share on other sites

try dissabling the lattest products it will get rid of the error for now, then send me your [includes/content/index.inc.php] file and ill see what i can do... it might be a case of hard coding the amount of latest products for you...

Link to comment
Share on other sites

in the file you sent me

Find

$latestProducts = $db->select("SELECT productId, image, price, name, sale_price FROM ".$glob['dbprefix']."CubeCart_inventory 

WHERE `showFeatured` = 1 ORDER BY productId DESC LIMIT ".$config['noLatestProds']);




Replace With




$latestProducts = $db->select("SELECT productId, image, price, name, sale_price FROM ".$glob['dbprefix']."CubeCart_inventory 

WHERE `showFeatured` = 1 ORDER BY productId DESC LIMIT 6");

Link to comment
Share on other sites

in the file you sent me

Find

$latestProducts = $db->select("SELECT productId, image, price, name, sale_price FROM ".$glob['dbprefix']."CubeCart_inventory 

WHERE `showFeatured` = 1 ORDER BY productId DESC LIMIT ".$config['noLatestProds']);




Replace With




$latestProducts = $db->select("SELECT productId, image, price, name, sale_price FROM ".$glob['dbprefix']."CubeCart_inventory 

WHERE `showFeatured` = 1 ORDER BY productId DESC LIMIT 6");

I dunt know how to thank you for your help, but really thank you for being with me all the way,

Anyhow I changed the code as you recommended, and its obvious this line was the error, but i dunt know this coding, anyhow,

the error is gone... but when i browes my customer page, nothing comes, no error, but its blank page, nothing at all, i tried to update the general settings, but still the same...all blank!

Any idea

I thank you again.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...