Re: database hell

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/12/12, Ashley Sheridan <ash@xxxxxxxxxxxxxxxxxxxx> wrote:
>
>
> "marco@xxxxxxxxxx" <marco@xxxxxxxxxx> wrote:
>
>>
>>
>>
>>Nick Edwards <nick.z.edwards@xxxxxxxxx> hat am 12. Juli 2012 um 14:00
>>geschrieben:
>>
>>> On 7/12/12, Gibbs <linux@xxxxxxxxxxxxxxx> 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/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>
> 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*

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



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux