Hello all.
I have a table setup kinda like this:
table: dp
did int(99) pri key
uid int(99)
table: inventory
uid int(99) pri key
active varchar(1)
I am wanting to pull random data from dp based on inventory showing active for the matching ID.
I have this unworking query, can someone help me on this?
TIA.
$p_sql = "SELECT a.*, b.* FROM ".$prefix."dealers_picks AS a, ".$prefix."inventory AS b";
$p_sql .= " WHERE b.active='Y' ORDER BY RAND() LIMIT 0,5";
$picks = $myDb->dbFetch($p_sql);