Re: [PHP] Query to select every other record

2002-11-18 Thread Marek Kilimajer
You need this: while($row=mysql_fetch_array($res)) { echo first column; if($row=mysql_fetch_array($res)) { echo second column; } } Darren McPhee wrote: Does anybody know of a SELECT QUERY that will select every other record of a table ? I want to do this so that I can display m

RE: [PHP] Query to select every other record

2002-11-17 Thread David Freeman
> Does anybody know of a SELECT QUERY that will select every > other record of a > table ? I want to do this so that I can display my products > in 2 columns (I > will also be using arrays of course). Don't know of a select that'll do it, but then I don't really understand why you'd want

RE: [PHP] Query to select every other record

2002-11-17 Thread John W. Holmes
Okay, stop and take a break. Now come back to the problem and ask yourself how you can display the results, two at a time on each row. After you display every second item, you want to end the row and start another one. Something like this... "; while($r = mysql_fetch_row($result)) { echo "show y