Hi,
I got this warning:
mysql_query(): 4 is not a valid MySQL-Link resource.
The line which cause this warning is:
mysql_query("in sert into $tablename (id,priority) values('$id',
'0.00')", $link2);
As far as understand the problem is that $link2 is "not a valid MySQL-
Link resource".
I specify $link2 in this way:
$link2 = mysql_connect( "localhost","lo ctopu_user","us erpsw" );
And it seems to be valid to some place in my code (because I
successfully use it with different mysql_queries). The problem appears
after I call one function. After that $link2 is not a valid MySQL-Link
resource anymore. In the function I open and close another connection
to the MySQL server. But doing that I use another name for the link
resource. Moreover, I think, the link resource used in a function
should is treated a local variable, so it should be invisible from the
outside of the function.
So, what can it be? How a function can destroy the link resource of
the program which calls the function?
Thank you.
I got this warning:
mysql_query(): 4 is not a valid MySQL-Link resource.
The line which cause this warning is:
mysql_query("in sert into $tablename (id,priority) values('$id',
'0.00')", $link2);
As far as understand the problem is that $link2 is "not a valid MySQL-
Link resource".
I specify $link2 in this way:
$link2 = mysql_connect( "localhost","lo ctopu_user","us erpsw" );
And it seems to be valid to some place in my code (because I
successfully use it with different mysql_queries). The problem appears
after I call one function. After that $link2 is not a valid MySQL-Link
resource anymore. In the function I open and close another connection
to the MySQL server. But doing that I use another name for the link
resource. Moreover, I think, the link resource used in a function
should is treated a local variable, so it should be invisible from the
outside of the function.
So, what can it be? How a function can destroy the link resource of
the program which calls the function?
Thank you.
Comment