Hello,
New to the forum.
I've been working with php for some time, and I can't seem to resolve this little problem.
I'm accessing mysql and retrieving fields into a Webpage.
I'm using a table and wanted to have 2 results for each row:
Example,
<tr><td>Result1</td><td>Result2</td></tr>
<tr><td>Result3</td><td>Result4</td></tr>
I'm using the following code:
if ($myrow = mysql_fetch_array($result)) {
do { printf("<tr><td>%s</td </tr>", $myrow[column1]);
} while ($myrow = mysql_fetch_array($result)); }
Now, my problem is that I if I use this I get all the results listed under my query on Mysql (that isn't requesting by ID I'm afraid)
Is there any way where I can replace the While statment and specify that I only need the first 2 results on my query and then repeat it to, let say get result 4 and 5 ?
thanks in advance for any help!
Regards