View Single Post
Old 07-16-2009, 02:25 PM   #5 (permalink)
russellharrower
The Contributor
 
russellharrower's Avatar
 
Join Date: Jul 2009
Posts: 80
Thanks: 13
russellharrower is on a distinguished road
Default

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(=> '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
russellharrower is offline  
Reply With Quote