help with $wpdb
-
Hello All:
I have a query like this working fine in mysql:
$result = mysql_query(“SELECT * FROM products WHERE prod_id = $prod_id”);
while($row = mysql_fetch_array($result, MYSQL_BOTH))
{ $c66id = $row[‘c66_id’];
}I am trying to do something similar with $wpdb; i know how to query it; but i cant figure out how to loop through results and put row values into variables like i did with the “while” statement above…
I can write a query like this on $wpdb:
$wpdb->query(“SELECT * FROM products WHERE prod_id = $prod_id”);I just cant figure out how to make it loop through the rows…
can anyone help?
thanks, G
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘help with $wpdb’ is closed to new replies.