Page 1 of 1

insert/retrieve html from db

Posted: Thu Sep 16, 2010 7:59 am
by Anant
Hi ,

Is it fine to insert html data to mysql manually like this -

Code: Select all

insert into test (x)
values("<ul><li>abcdefghijikmno.....</li><ul>")
and retrieve like this -

Code: Select all

$query = select x from test where uid = '1'
$output = mysql_query($output, $db) or die(mysql_error());
I am having issues in retrieving the html - it's blank ..

Any ideas ?

Re: insert/retrieve html from db

Posted: Thu Sep 16, 2010 10:40 am
by Anant
solved it - the query to retrieve wasn't correct...