Jump to content

mysql_fetch_row()


jamess

Recommended Posts

I have a query that pulls records from a table for a front page news summary.

 

it uses mysql_fetch_row() to load the records into an array, but it will only pull the first record, how do i choose which row to insert? (there are no fields which specify the order, and i can't add more)

 

$querystr = "SELECT * FROM `mdl_forum_posts` WHERE `subject` = 'Test News' ORDER BY `mdl_forum_posts`.`modified` DESC LIMIT 0 , 30";
$newsquery = mysql_query($querystr);
$news_item = mysql_fetch_row($newsquery);
$news_summary = $news_item[8];

 

 

Cheers,

 

 

James

Link to comment
https://forums.phpfreaks.com/topic/166195-mysql_fetch_row/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.