hi i wish to log mysql error syntax errors to the database. to do this i close the connection in the error handler and then open a new one (everything returns success at this point). the problem is that - when i attempt to send a query - the new connection gives the same error that originally caused the error to be thrown. this leads me to suspect that closing and then opening a connection isnt actually getting me a new connection. ps. mysql_connect is ignoring the new_link flag any help gratefully received, thank you
I have done this successfully before. For example: $connection = dbConnect(); $query = "some query"; if (!($result = @ mysql_query ($query, $connection))) { $connection2 = dbConnect(); $result = @ mysql_query ($query, $connection2) } Code (markup):