[RESOLVED] STill working on converting to mysqli from mysql more issues
In the past I had this query
Using this result/row
$query="select `imag_url` from `inventy` where `shop`='".$shop."' and `qty`>='".$cnfig['shop_min_qty']."' and `cat`='".$row3->cat."' and `imag_url`!='' order by rand() limit 1";
and it worked fine. I convert it to use the same query with this row/result
$row = mysql_fetch_object($result);
and I get no imag_url echoed back. I can test the row exists with $result->num_rows and I get '1' but can't get anything out of the row.
I finally got it to work by using
I've got the $result->fetch_object in other places fetching only one row and it works. Can anyone tell me why it wouldn't work here? Is there something to do with the selecting one at random? This one has me really confused and I'd really like to know why.
Function calls use '()'. $result->fetch_object isn't a function call; $result->fetch_object() is.
Darn I would have sworn it was on there. I swear I've been looking at this too long. Thanks I'll try not to be stupid.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread