04062005 1222 GMT-6
Mike, Im getting this on every application I have now. Every page I have
that uses a query is now saying
/"mysql_fetch_array(): supplied argument is not a valid MySQL result
resource" . /I can run commands from the mysql Control Center just fine.
Heck, I even restarted just to be sure.
Wade
Mike Franks wrote:
>
> *******************
> On 4/6/2005, "Wade" <[EMAIL PROTECTED]> wrote:
>
> I started getting the following error today - but I have not changed
> this page in weeks...?
>
> */*/*/*Warning*: mysql_fetch_array(): supplied argument is not a valid
> MySQL result resource
>
> /*/*/*
> This is the code that I have always used to access the db....
>
>
> $sql = "SELECT username, password FROM user WHERE username =
> '".$user."'
> AND password ='".$pass."'";
>
> $result = mysql_query($sql, $connection);
>
> while ( $row = mysql_fetch_array($result)){
>
>
> Wade
> *******************
>
> Mike Franks' reply:
>
> Wade, I suspect either:
> 1) you're not successfully connecting to the data base
> 2) there's some other problem accessing your 'user' table in the data
> base
>
> The error message is telling you something is wrong with $result.
>
> Try adding an "or die" clause to mysql_query(...), or try running your
> query directly against the data base.
>
> Mike
>
>
> Community email addresses:
> Post message: [email protected]
> Subscribe: [EMAIL PROTECTED]
> Unsubscribe: [EMAIL PROTECTED]
> List owner: [EMAIL PROTECTED]
>
> Shortcut URL to this page:
> http://groups.yahoo.com/group/php-list
>
>
> ------------------------------------------------------------------------
> *Yahoo! Groups Links*
>
> * To visit your group on the web, go to:
> http://groups.yahoo.com/group/php-list/
>
> * To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
>
> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/>.
>
>
>------------------------------------------------------------------------
>
>No virus found in this incoming message.
>Checked by AVG Anti-Virus.
>Version: 7.0.308 / Virus Database: 266.9.3 - Release Date: 4/5/2005
>
>
[Non-text portions of this message have been removed]
Community email addresses:
Post message: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-list
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php-list/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/