Re: how do I make a script wait ?
| From: | Curt Zirzow | Date: | Tue, 13 Apr 2004 14:18:32 +0000 |
| Subject: | Re: how do I make a script wait ? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-183233@lists.php.net to get a copy of this message | ||
* Thus wrote Damian Brown (damian@phpexpert.org):
> The code is shown below
>
> ...
> $key=1 ;
> while ($row=mysql_fetch_row($result)){
> ?>
> <?php mysql_query("INSERT INTO searchsorting (username,bid) VALUES ( '
> $row[5] ' , ' $row[6] ' )");
> $a = array( $key => $row[6] );
> $key=$key + 1 ; ?>
btw, $a will only have one element in it no matter how many results
are returned from your sql statement. You want somethng like this:
$a[$key++] = $row[6];
//$key=$key + 1;
*note the $key increment also.
HTH,
Curt
--
"I used to think I was indecisive, but now I'm not so sure."