Jump to content

Skip first result of array


dachshund

Recommended Posts

Hi,

 

I have the following code but I want to skip the very first result (or row) as I already have that echoed in a different format above.

$sql = "SELECT * FROM content WHERE `live` LIKE '0' AND `date` >= SUBDATE(CURRENT_DATE, 1) ORDER BY `views` DESC LIMIT 40";
$result=mysql_query($sql);
while($rows=mysql_fetch_array($result)){

Thanks

Link to comment
https://forums.phpfreaks.com/topic/278247-skip-first-result-of-array/
Share on other sites


$sql = "SELECT * FROM content WHERE `live` LIKE '0' AND `date` >= SUBDATE(CURRENT_DATE, 1) ORDER BY `views` DESC LIMIT 40";
$result=mysql_query($sql);
$rows = mysql_fetch_array($result);
// echo in format A
while($rows=mysql_fetch_array($result)){
// echo in format B
}

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.