NYCPHP Meetup

NYPHP.org

[nycphp-talk] Additional eyes for troublesome (but simple) mysql functions?

R. Mariotti r.mariotti at fdcx.net
Fri Dec 1 09:29:23 EST 2006


Gentlemen;

I've been playing with this for a full day now trying various formats 
without luck.  I'm convinced that I must be missing something.

So, before the weekend come around and I literally forget everything I 
know about this, I thought I would post my error sections for some peer 
assistance.

Can someone please take a look and see if there is anything obvious and 
advise (I'm beyond embarrassment).  The lines beginning with >>>> are 
debugging lines to show what is contained in certain fields.

/************************************************************************************/
/* Determine if Specified 'system_id' is new or existing and set action 
accordingly */

 >>>>	qb_default->db_host=[raid]

 >>>>	qb_default->db_user=[qb_user]

 >>>>	qb_default->db_password=[********]

 >>>>	qb_default->dbname=[quote_build_test]

	$dbh = 
mysql_connect($qb_default->db_host,$qb_default->db_user,$qb_default->db_password);

 >>>>	dbh=[Resource id #5]

	$rtn = mysql_select_db($qb_default->dbname,$dbh);

 >>>>	rtn=[1]

	$sql="select id from $qb_default->system_list where  id = 		 
'$system_id' limit 1";

 >>>>	sql=[select id from systems where id = '181' limit 1]

	$req=mysql_query($sql,$rtn);

 >>>>	Warning: mysql_query(): supplied argument is not a valid 		 
MySQL-Link resource


As you can see by the Warning message... mysql is stating that the $rtn 
field I am sending is NOT a valid resource.  However, it is the result 
of the previous mysql_select_db and seems OK.

What am I missing???

Thanks all!

bobmct



More information about the talk mailing list