Jump to content

[SOLVED] pulling popular data from database


ccrevcypsys

Recommended Posts

so im having a problem getting this syntax to work properly

what i am trying to do is display the top 15 songs and when u scrollover the links of the song names that are pulled from the db it shows a title that displays there first and last name along with price pop and album name. all of these are in the same table except for firstName and lastName these are in the customer table.

 

its like this

cc_CubeCart_customer = firstName lastName

cc_CubeCart_inventory = popularity, albumName, image, name, price

here is the code i have made so far

$popularProds = $db->select("SELECT * FROM ".$glob['dbprefix']."CubeCart_inventory WHERE deleted = 0 ORDER BY popularity DESC LIMIT 15");

This does not have the firstName and lastName so here is the one i tried but it messed the order up and just showed the same song over and over again

$popularProds = $db->select("SELECT * FROM ".$glob['dbprefix']."CubeCart_inventory JOIN ".$glob['dbprefix']."CubeCart_customer WHERE deleted = 0 ORDER BY popularity DESC LIMIT 15");

 

 

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.