On Mon, Jul 21, 2008 at 7:55 AM, Aschwin Wesselius
<[EMAIL PROTECTED]> wrote:
> Eric Butera wrote:
>
> On Mon, Jul 21, 2008 at 7:24 AM, Ronald Wiplinger <[EMAIL PROTECTED]>
> wrote:
>
>
> On a system with php4 and mysql 4.x I had these lines:
>
> require("../db-config"); // includes $dbhost, $buname, $dbpass
> $db = mysql_connect($dbhost, $dbuname, $dbpass);
> mysql_select_db($dbname,$db);
>
> $sql = "SELECT * FROM CATEGORY WHERE .....";
> $result = mysql_query($sql,$db);
> $num=mysql_num_rows($result);
> while ($myrow = mysql_fetch_array($result)) {
> ....
>
> Moving the *.php to a php5 and mysql 5.x site I get these errors:
>
> PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL
> result resource in ...
> PHP Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
> result resource in ...
>
>
> Looking at the manual, I cannot see what I am doing wrong.
>
> bye
>
> R.
>
>
>
> Your mysql_connect is probably failing. Look at your error log or
> look at mysql_error() for a reason why.
>
> Probably the mysql extension is not found or not loaded (due to not being
> compiled with the right path or the default path in PHP is not the right
> one). Happened to me a couple of times.....
>
>
> --
>
> Aschwin Wesselius
>
> 'What you would like to be done to you, do that to the other....'
>
Wouldn't that be call to undefined function then?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php