Maybe mysql_result description could help you.
int mysql_result(int result, int row, mixed [field] );
mysql_result() returns the contents of one cell from a MySQL result set. The
field argument can be the field's offset, or the field's name, or the
field's table dot field's name (fieldname.tablename). If the column name has
been aliased ('select foo as bar from...'), use the alias instead of the
column name.
When working on large result sets, you should consider using one of the
functions that fetch an entire row (specified below). As these functions
return the contents of multiple cells in one function call, they're MUCH
quicker than mysql_result(). Also, note that specifying a numeric offset for
the field argument is much quicker than specifying a fieldname or
tablename.fieldname argument.
Calls mysql_result() should not be mixed with calls to other functions that
deal with the result set.
Recommended high-performance alternatives: mysql_fetch_row(),
mysql_fetch_array(), and mysql_fetch_object().
I usualy use mysql_fetch_object($result).
----- Original Message -----
From: John-Mark <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 05, 2001 1:56 AM
Subject: warning using php
> Hello all I hope you can help.
> I am using the line
> $email = mysql_result($result,0,"email");
> in php4
> when i load the page I get
> Warning: Supplied argument is not a valid MySQL result resource
in/var/www/dbase/index.php on line 10
> This is the line i have written the code.
> I have tried it several different ways all to no avail
> Thanks in advance
> jm
> --
> John-Mark
>
> ---------------------------------------------------------------------
> 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