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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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

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

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.