On 12/07/12 12:29, Nick Edwards wrote:

We have a program that manages users, throughout all database calls

created as:
$connect = mysql_connect($db_host--other variables);
mysql_query("Delete from clients where id=$User");

All this works good, but, we need, in the delete function to delete
from another database

                     mysql_query("DELETE from userprefs where clientr='$User'");
this fails, unless we use a mysql_close prior to it, and then
reconnect to original database after we run this delete, how can we
get around this without closing and reopening?
We have a  perl script doing similar for manual runs, and it works
well knowing that $connmy is not $connect, I'm sure there is a simple
way to tell php but  I'm darned if I can see it.


You need to make a new link. So you would add TRUE to the end of the second connection.

$connmy=mysql_connect("host","user","pass", TRUE);



PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to