943,692 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 1174
  • PHP RSS
You are currently viewing page 2 of this multi-page discussion thread; Jump to the first page
Sep 18th, 2009
0

Re: MY PHP MySQL Function keeps returning error message: "Database Query Failed"

Click to Expand / Collapse  Quote originally posted by HFK11 ...
PHP Syntax (Toggle Plain Text)
  1. 1.
  2. $connection="mysql_connect('localhost', 'admin', '1admin') or die(mysql_error())";// host account password
If I may ever so gnetly ask a dumb question, why is the function call inside quotes? This results in $connection containing the string you see, rather than a handle referencing the desired database connection. To actually execute mysql_connect, you need to remove the double quotes.
Reputation Points: 51
Solved Threads: 35
Posting Whiz in Training
Fest3er is offline Offline
238 posts
since Aug 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Link in php want to get that in html
Next Thread in PHP Forum Timeline: How to create an excel spreadsheet?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC