View Full Version : line break in mySql
ggalan
07-21-2010, 11:40 PM
is it possible to add sql string entry with line breaks?
ive tried the expression \n but it didnt work when parsing with php
djr33
07-22-2010, 03:21 AM
Yes, but it depends on the format.
For example:
$line = "\n";
mysql_query('......'.$line.'.....');
That would work.
Also, you can just add a line break in the query:
mysql_query('one
two');
If you still have trouble, you'll need to post some code so we can help.
ggalan
07-23-2010, 11:59 PM
i didnt know you can add an actual line break in the query!
thanks
djr33
07-24-2010, 02:11 AM
MySQL is a full programming language, though often it is used through a language like PHP.
If you want to see an example of lots of MySQL code, with comments and many line breaks, just look at the backup from a database (such as generated from phpmyadmin).
Glad to hear it works.
alex28
07-29-2010, 05:25 AM
yes you can and the syntax is correct that is given by the earlier post
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.