Like I have a clue :)

I want to convert some fields from TEXT to VARCHAR(255).
(Going from a textarea to an input type=text)
I've checked the length of each $mydata->ST, so I won't be losing data.
What I am worried about is losing data if there are \n in any of the fields.

How do I check to see if a \n exists in $mydata->ST in my WHILE statement?

$sql = 'SELECT id,ST FROM ccl.ccl_main';
...
$news = mysql_query($sql);
 while ($mydata = mysql_fetch_object($news))
      {
if ???????$mydata->ST?????????
  echo "$mydata->id  -  $mydata->ST<hr>";
 }



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

Reply via email to