On Wed, 21 Feb 2001, Warren wrote:

> ============ SNIP ============
> <?php
> MYSQL_CONNECT("localhost","yourID","yourPASSWORD");
>      mysql_select_db("yourDATABASE");
> $ex=@MYSQL_QUERY("select * from questions where uid='1' ");
> echo '<table width="95%" border="1" cellspacing="4" cellpadding="4"
> align="center" bgcolor="#FFFFCC" bordercolorlight="#CCCCFF"
> bordercolordark="#999999">';
> echo "<form action=\"integrateTest.php3\" method=\"GET\">";
> 
> //THE NEXT TWO LINES -- TRY EXECUTING ONE SELECT AND THEN COMMENT THE OTHER
> LINE AND EXECUTE THE OTHER SELECT
> //$ex=@MYSQL_QUERY("select * from questions where uid='1' ");
> $ex=@MYSQL_QUERY("select * from questions  ");
> 
> 
> $peek=@mysql_fetch_row($ex);

The above line assigns the first row of the query to the variable $peek
(array), and then moves the internal pointer on to the next row.

When you then do the following, no wonder you're receiving one less
result... :)


Atle


>   while($row = mysql_fetch_array($ex))
>   {
> $var=$row["uid"];
> echo "<tr> <td><div align=\"left\">";
> echo "<b>select: </b><input type='checkbox' name='ID[]' value='$var'>";
> echo "</b></div> <div align=\"left\"><b>Question:</b>
> $row[question]</div></td>  </tr>";
>       }
> echo "</table>";
> echo ' <p align=center><input type="submit" name="Submit" value="Create
> Test"> </form></p>';
> ?>
> ============ SNIP ============
> 
> I suspect that it is something ridiculous that I am doing (or not doing),
> but I just don't see it.
> Would someone mind setting me straight on what I'm not doing correctly?
> 
> Thanks heaps!
> 
> -Warren
> 
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> 


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to