Warning: Supplied argument is not a valid MySQL result resource in
e:/apache/apache/htdocs/tr.php on line 7
huum this is the error I got. you need to read a bit more mysql
documentation
and perhaps the mysql functions in php.
what data base are you trying to show_tables on ?
""paul morgan"" <[EMAIL PROTECTED]> wrote in message
9a3623$72d$[EMAIL PROTECTED]">news:9a3623$72d$[EMAIL PROTECTED]...
> hi,
> I'm new to this game but have managed to set up apache 1.3.19 that runs
> php/4.0.4pl1 (the apache dll I think) on Win 98 SE. I've also installed
the
> windows build of mysql, version 3.23 I think and can administer easily via
> the msdos prompt. I have removed the general root user, as in the mysql
Docs
> and replaced it with my own logon user and pwd.
>
> The problem is that I can't seem to pull anything out of a database that I
> create. I've read the docs that come with mysql, esp Ch6 and privileges,
but
> even simple things like typing 'show grants;' gives me an error in the
msdos
> prompt yet I can insert, delete etc data from the database I created
whilst
> in the msdos prompt - command line interface. I can connect to mysql using
> the 'mysql_connect() function in php I think (I don't get any erroes when
> just testing the connection) but when actually going to do something via
php
> I get an error similar to this;
>
> Warning: Supplied argument is not a valid MySQL result resource in
> ...location of file then line number.
>
> Some example code that fails is below. It fails on the line where the
> 'while' loop starts but I think that's because the $result var doesn't
seem
> to be allowed to list tables?? but I don't know why.
>
>
> <?php
>
> $link_id = mysql_connect("localhost", "myUsername", "myPassword");
>
> $result = mysql_query("SHOW TABLES", $link_id);
>
> while($query_data = mysql_fetch_row($result))
> {
> echo "$query_data[0], is some data <br>";
> }
>
> ?>
>
>
> Anyone got any ideas as to why I'm getting stuffed? Is it permissions
within
> mysql or is there a known bug in one of the apps that is messing me about.
> Any suggestions gratefully received. Please reply to this or to my addy
> directly.
>
> Many thanks ;)
>
> Paul
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]