Jump to content

Return ONLY the 2nd result set in a query?


Punk Rock Geek

Recommended Posts

I have a select query:

 

$query = mysql_query ("SELECT * FROM tablename where id=1");

 

I would like to specifically return the 2nd result as a variable.  How would I got about doing this?  I have tried this:

 

while ($row = mysql_fetch_array($query)) {
$result = $row[1][fieldname];
}

 

But it doesn't seem to do anything meaningful.  Help?

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.