[PHP-DB] Newbie alert: supplied argument is not a valid MySQL result resource

2007-07-09 Thread Matt Leonhardt
Okay, so I get that the mysql_query() function here is not returning a valid resource identifier. I just can't figure out why...here's the pertinent code: (db.php) (auth.php) http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Newbie alert: supplied argument is not a valid MySQL result resource

2007-07-11 Thread Matt Leonhardt
""lameck kassana"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > hey just make this > $sid = mysql_fetch_array($query) or die ('Could not fetch from database: >> ' ." mysql_error()."); > try this Yep. I figured that out yesterday. Hit the nail right on the head. As I've lear

Re: [PHP-DB] First and Last ID of a table

2007-07-11 Thread Matt Leonhardt
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > SELECT MIN(id), MAX(id) FROM mytable As an aside, is you are using associative arrays, be sure to use the following keys: $array['MIN(id)'] and $array['MAX(id)'] Just something I figured out recently :) Matt -- PHP Database Mail