PostgreSQL - lose new line characters
Posted: Sat Jul 27, 2002 6:01 am
When I am getting a varchar from the database I do not get the new lines all the text just comes out as one block of text. Howcan I get the data out of the database with the newline characters still intake. I can tell the newline characters are in the database so how can I get the data out with those newline characters intake. I use the following code to get the data out of the database:
$result=pg_exec($db, "SELECT * FROM Jobs WHERE JobID = $JID;");
$row = pg_fetch_row($result, 0);
$Jpo=$row[0];
$Jch=$row[1];
$Jdm=$row[2];
$Jad=$row[3];
$Jci=$row[4];
$Jst=$row[5];
$Jzp=$row[6];
$Jco=$row[7];
$Jph=$row[8];
$Jem=$row[9];
$Jur=$row[10];
$Jcn=$row[11];
$Jjd=$row[12];
Thanks for your help
Reubs
$result=pg_exec($db, "SELECT * FROM Jobs WHERE JobID = $JID;");
$row = pg_fetch_row($result, 0);
$Jpo=$row[0];
$Jch=$row[1];
$Jdm=$row[2];
$Jad=$row[3];
$Jci=$row[4];
$Jst=$row[5];
$Jzp=$row[6];
$Jco=$row[7];
$Jph=$row[8];
$Jem=$row[9];
$Jur=$row[10];
$Jcn=$row[11];
$Jjd=$row[12];
Thanks for your help
Reubs