07-30-2009, 03:05 PM
|
#9 (permalink)
|
|
The Wanderer
Join Date: Jul 2009
Posts: 5
Thanks: 0
|
Russel,
I don't know this class Mysqli. What does $mysqli->query return? A statement or a result?
If is a result, the code should work passing back $result into fetch.
Could you post Mysqli class declaration?
PHP Code:
//this should work like this
$result = $mysqli->query("SELECT * FROM push_content LIMIT 10");
$titles = array();
while($row=$mysqli->fetch_assoc($result))
//while($row=$mysqli->fetch_array($result))choose the best option
{
$titles[] = $row['title'];
}
PHP tags added - please read Prettifying Pasted Code on TalkPHP
Last edited by codefreek : 07-30-2009 at 03:07 PM.
Reason: PHP tags added - please read http://www.talkphp.com/lounge/4563-prettifying-pasted-code-talkphp.html
|
|
|
|