Skip navigation links

MySQL Forums :: Newbie :: Error: mysql_select_db() expects parameter 2 to be resource, null given


Advanced Search

Error: mysql_select_db() expects parameter 2 to be resource, null given
Posted by: Stacie Keneekr ()
Date: May 19, 2010 12:48PM

I'm gettting the error Warning: mysql_select_db() expects parameter 2 to be resource, null given in C:\xampp\htdocs\SwenkePTO\indextest3.php on line 98 and 100 using the following code. I'm new to MySQL, so any help with understanding what it means is greatly appreciated. It did work without this error on my desktop, but not my laptop...

Thanks

98 mysql_select_db($database_SwenkePTO_db, $SwenkePTO_db);
99 $query_Swenke_PTO_Chair_results = "SELECT * FROM chairform_results";
100 $Swenke_PTO_Chair_results = mysql_query($query_Swenke_PTO_Chair_results, $SwenkePTO_db) or die(mysql_error());
101 $row_Swenke_PTO_Chair_results = mysql_fetch_assoc($Swenke_PTO_Chair_results);
102 $totalRows_Swenke_PTO_Chair_results = mysql_num_rows($Swenke_PTO_Chair_results);

Options: ReplyQuote


Subject Written By Posted
Error: mysql_select_db() expects parameter 2 to be resource, null given Stacie Keneekr 05/19/2010 12:48PM
Re: Error: mysql_select_db() expects parameter 2 to be resource, null given Peter Brawley 05/19/2010 12:51PM
Re: Error: mysql_select_db() expects parameter 2 to be resource, null given Shawn Taylor 05/19/2010 01:39PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.