Hi:
I'm writing a cms to control some websites.
I dumped a copy of the db on my local machine whilst i was developing it.
Now i've connected remotely and the cms has gone haywire.
It worked fine on my localhost.
its a simple query:
its obviously connecting to the database (remote) becuase it would throw up an error, but i get:Code://QUERY STRING TO GET ALL user INFORMATION FOR THIS user ID $query = "SELECT * FROM Users WHERE user = '" . $user . "'" ; //RUN QUERY AND STORE IN $result $result = mysql_query($query); //print while ($row = mysql_fetch_object($result)) { $user = $row -> user ; $pass = $row -> pass ; echo $user . $pass ; }
so the query isn't working but its a simple table with 2 fields that works fine if the db is on my local machine.also i've checked that the table contains the user variable i'm using for the query.Code:Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in C:\wamp\www\admin\logcheck.php on line 34
any help?


Reply With Quote
Bookmarks