Learning Academy

The Cure of Ignorance is to Question. MUHAMMAD (PBUH)

MySQL

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /var/www/html/xy

1
mysql_select_db()

expects the second parameter to be a resource identifier = your connection.:


1
<span class="kwd">function</span><span class="pln"> </span><span class="typ">Visit</span><span class="pun">(</span><span class="pln">$url</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">     $spyware </span><span class="pun">=</span><span class="pln"> mysql_connect</span><span class="pun">();</span><span class="pln"> </span><span class="com">// set this to connect properly</span><span class="pln">     echo $url</span><span class="pun">;</span><span class="pln">     mysql_select_db</span><span class="pun">(</span><span class="pln">$database_abc</span><span class="pun">,</span><span class="pln"> $abc</span><span class="pun">)</span><span class="pln"> </span><span class="pun">||</span><span class="pln"> </span><span class="kwd">die</span><span class="pun">(</span><span class="pln">mysql_error</span><span class="pun">());</span><span class="pln">     </span><span class="com">// the rest of your function goes on ...</span>

 

Muhammad Shaukat

Content Developer at LearnAcad.com

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Pin It on Pinterest