Koozali.org: home of the SME Server

mySQL functions

brad wright

mySQL functions
« on: May 27, 2001, 09:05:53 AM »
hi all,

I was wondering if the version of mySQL distributed with e-smith 4.1.2 is exactly the same as the version downloadable from mySQL.com.
The reason i ask is that I am getting an error mesage that reads:
Warning: Supplied argument is not a valid MySQL result resource in mysql_demo/html/index.php on line 17

the code i am using on line 17 is:
$num_fields = mysql_num_fields($result);


I get the same error when using other functions like :
mysql_fetch_fields etc....

Is it my syntax or is there something a little strange about howe e-smith configures the mysql server????


help!!!!!

Thanks

Kirrily Robert

Re: mySQL functions
« Reply #1 on: May 28, 2001, 11:32:25 PM »
brad wright wrote:
>
> hi all,
>
> I was wondering if the version of mySQL distributed with
> e-smith 4.1.2 is exactly the same as the version downloadable
> from mySQL.com.

Not exactly sure, but it is identical to the version we got from the Red Hat 7.0 updates area.  (Strictly speaking, it *IS* that version :) )

You can find out the version and changes by typing:

    rpm -q --changelog mysql
    rpm -q --changelog mysqlclient9
    rpm -q --changelog mysql-server
    rpm -q --changelog mysql-devel

We (and Red Hat) may also be a little behind the latest official MySQL.com release.

K.

Matthias Redl

Re: mySQL functions
« Reply #2 on: May 30, 2001, 01:50:45 PM »
Hi brad,

this sounds like if there is another error before the line 17, you should propably check the query, check if the script connects to the db correctly and so on.

This error normally indicates that the query failed due to some reason and therefor $result is not valid and mysql_num_fields causes an error.

Matthias