Re: Re: storing a mysql query in mysql

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

 



On Wed, 2010-02-17 at 11:47 -0600, Shawn McKenzie wrote:

> Matt Giddings wrote:
> > Whats the best way to store a mysql query in mysql. I'm trying to store a mysql query in a debug log table if there is a problem with the query. I've tried using addslashes and a few other commands. I don't have a problem putting the data into the database but when I view it with sqlyog its f'ed up beyond belief. Is there another/better way to store this information? 
> > 
> > Thanks, 
> > Matt 
> > 
> 
> What's f'ed up?  I mean, I know what it means, but what does it look
> like when you view it?
> 
> -- 
> Thanks!
> -Shawn
> http://www.spidean.com
> 


Don't use addslashes for entering content into the database, as it won't
guarantee the data is safe for a database. Instead, use
mysql_real_escape_string, which uses the character set of your current
connection to fix the string.

Thanks,
Ash
http://www.ashleysheridan.co.uk



[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