On 15/07/2012 17:07, Nick Edwards wrote: > On 7/12/12, Ashley Sheridan <ash@xxxxxxxxxxxxxxxxxxxx> wrote: > >> "marco@xxxxxxxxxx [5]" <marco@xxxxxxxxxx [6]> wrote: >> >>> Nick Edwards <nick.z.edwards@xxxxxxxxx [2]> hat am 12. Juli 2012 um 14:00 geschrieben: >>> >>>> On 7/12/12, Gibbs <linux@xxxxxxxxxxxxxxx [1]> wrote: >>>> >>>>> mysql_query("DELETE from userprefs where clientr='$User'", >>> $connmy); Sidenote: And don't forget to validate user input and make use of mysql escape and prepared statements ;) -- PHP General Mailing List (http://www.php.net/ [3]) To unsubscribe, visit: http://www.php.net/unsub.php [4] >> Another way if the access credentials are the same would be to specify the full 'path' to the table in the query: DELETE FROM database.table WHERE clause > > Umm I wouldn't be doing that if using mysql replication, I only now (2 > days later) discovered that broke it! but your suggestion was the only > one that allowed it to work without crashing out for unauthed access > to (wrong) database when using db1 and db2 (worked until it needed to > return to db1, strill tried to use db2 method, hrmm at least perl > knows to return to use the original, not php though) > > thanks to all suggestions, looks like we just need to close db1 con > db2, close db2 and recon to db1 *sigh* Google for "mysql replicate-ignore-table" this will stop any replication errors because of unknown tables, well, if configured correctly :) -- If you are not the intended recipient, please notify the sender and delete all relevance of this message including any attachments immediately. Please do not send Microsoft proprietary formatted documents, instead use ODF or PDF. Links: ------ [1] mailto:linux@xxxxxxxxxxxxxxx [2] mailto:nick.z.edwards@xxxxxxxxx [3] http://www.php.net/ [4] http://www.php.net/unsub.php [5] mailto:marco@xxxxxxxxxx [6] mailto:marco@xxxxxxxxxx