In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] ("Shahmat Dahlan") wrote:

> $result=mysql_query($sqlstmt);
> # print $result;
> $row=mysql_fetch_array($result)
> extract($row);
> If I do the above, I get the results below:
> Warning: Wrong datatype in call to extract() in
> E:\winnt\temp\stock_in.php on line 39
> I've went through the query, and it seems alright. It worked previously,
> now all of a sudden it doesn't work anymore.. Can anyone help me out.

Since apparently $row is not an array, I'd guess that mysql_fetch_array has 
nothing to fetch (i.e. no row was returned by the query).  Two things to 
get into the habit of doing:

1) check that the query was valid.  For example:
 $result=mysql_query($sqlstmt) or die("Query error: " . mysql_error());

2) check that the query returned 1 or more rows.  For example:
   $row=mysql_fetch_array($result) or  die("Row fetching error: " . 
mysql_error()); //BTW, you were missing a semi-colon on this line


PHP Database Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to