Skip to main content
Goshine
Inspiring
May 24, 2007
Question

Php connect to dataBase

  • May 24, 2007
  • 1 reply
  • 352 views
ii have being getting erroe messages .. and everything seems to ok .. i dont know what the problem is ...this is the error {Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in G:\wamp\www\testApps\dataPage.php on line 13}
This topic has been closed for replies.

1 reply

Inspiring
May 24, 2007
scriptEater wrote:
> $sql = "SELECT * FROM friends;";

Remove the semicolon at the end of the SQL query. You need the semicolon
only if you're submitting the query in the MySQL Monitor. It should be:

$sql = "SELECT * FROM friends";

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/