When using aggregate functions in sql, it is good to name that expression
using the AS keyword.
Try this:
$result = mysql_query("select password(".$_POST['password'].") AS pword");
while ($p = mysql_fetch_array($result, MYSQL_ASSOC)){
$pswrd=$p['pword'];
}
Also, like David said, you should
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
says...
> hi,
> i want to encode a string that users enter with mysql password function. but
> sometimes this code works sometimes don't. mysql warns me:
> Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result
> resource in .