07-16-2009, 02:25 PM
|
#5 (permalink)
|
|
The Contributor
Join Date: Jul 2009
Posts: 80
Thanks: 13
|
Ok i have mysqli working, and man got to say alot easier then the old Mysql_Connect
this is my Mysqli code
PHP Code:
$mysqli = new mysqli("localhost", "$vconfig->user","$vconfig->dbpass","$vconfig->db" );
$result = $mysqli->query("SELECT * FROM push_content");
$row=$result->fetch_assoc();
print $row['title'];
$mysqli->close();
now this is my problem
the print $row['title'];
is only printing out one title
and I need it to print All the titles, in a array formate
PHP Code:
$titles = array(1 => 'title1', 'title2', 'title3');
I need away to also make it so it only fetchs the latest title first.
Thanks
Last edited by codefreek : 07-30-2009 at 03:00 PM.
Reason: PHP tags added - please read http://www.talkphp.com/lounge/4563-prettifying-pasted-code-talkphp.html
|
|
|
|