Jump to content

ezy but dumb lol


ccrevcypsys

Recommended Posts

i have to pull information from my database for first name and last name. But it is in a different table. here is the code that i have.

 

$popularProds = $db->select("SELECT productId, ".$glob['dbprefix']."CubeCart_inventory.type, popularity, image, albumName, price, name, productCode, sale_price, digital_sample, firstName,lastName, deleted FROM ".$glob['dbprefix']."CubeCart_inventory ".$glob['dbprefix']."CubeCart_customer on WHERE  deleted = 0 ORDER BY popularity DESC LIMIT 15");

Why is this not working?

 

heres the error

MySQL Error Occured
n1064: 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 'on WHERE deleted = 0 ORDER BY popularity DESC LIMIT 15' at line 1
n

QUERY = SELECT p oductId, cc_CubeCa t_i ve to y.type, popula ity, image, albumName, p ice, ame, p oductCode, sale_p ice, digital_sample, fi stName,lastName, deleted FROM cc_CubeCa t_i ve to y cc_CubeCa t_custome o WHERE deleted = 0 ORDER BY popula ity DESC LIMIT 15

Link to comment
https://forums.phpfreaks.com/topic/67917-ezy-but-dumb-lol/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.