unhappy camper

From: Date: Fri, 30 Mar 2001 23:53:09 +0000
Subject: unhappy camper
Groups: php.windows 
Request: Send a blank email to php-windows+get-6398@lists.php.net to get a copy of this message
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

« previous php.windows (#6398) next »