I've spent the morning searching google groups without success, so I'm
hoping someone has an idea of what's going on.
I connect to a database like this:
$catdb = @mysql_connect( "localhost" , "username", "password") ;
@mysql_select_d b("mydatabase", $catdb);
I have a problem on one script where I'll do a query using this connection,
and it doesn't return anything. No results, no errors, nothing. But when
I copy those two lines and paste them right above the query, it works fine.
It's like the query dies between then and here.
The first connection string isn't inside a function, but is the first two
lines of the script. What would cause a connection to not respond? I'd at
least expect a "$catdb is not a valid mysql link" or similar, but no error?
What's going on?
hoping someone has an idea of what's going on.
I connect to a database like this:
$catdb = @mysql_connect( "localhost" , "username", "password") ;
@mysql_select_d b("mydatabase", $catdb);
I have a problem on one script where I'll do a query using this connection,
and it doesn't return anything. No results, no errors, nothing. But when
I copy those two lines and paste them right above the query, it works fine.
It's like the query dies between then and here.
The first connection string isn't inside a function, but is the first two
lines of the script. What would cause a connection to not respond? I'd at
least expect a "$catdb is not a valid mysql link" or similar, but no error?
What's going on?
Comment