ccrevcypsys Posted September 5, 2007 Share Posted September 5, 2007 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"); Quote Link to comment Share on other sites More sharing options...
btherl Posted September 6, 2007 Share Posted September 6, 2007 You haven't specified a join condition. Eg SELECT * FROM CubeCart_inventory cci JOIN CubeCart_customer ccc ON (cci.album_id = ccc.album_id) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.