jasman
-
Posts
1 -
Joined
-
Last visited
Never
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
include files question
in PHP Coding Help
Posted
mysql_select_db($database_workorder, $workorder);
$query_rst_org2 = "select org_name from org where org_id = $orgid";
$rst_org2 = mysql_query($query_rst_org2, $workorder) or die(mysql_error());
$row_rst_org2 = mysql_fetch_assoc($rst_org2);
$totalRows_rst_org2 = mysql_num_rows($rst_org2);
When I try this in the included file it fails with this error:
mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/u4//html/lookup2.php on line 34
line 34 is this line: mysql_select_db($database_workorder, $workorder);
doesn't the include function basically paste the code into the calling page? and if so shouldnt all of the vars that are available in the calling page be available to the code that is being called in the include page?
obviously my approach is flawed, can someone please explain?
thanks
Jason