I need to update one string value which contains /n
into mysql table but after update that string value creates new line.
I am using some code which is given below.
require_once 'include/dbconfig.php';
$tracking_id='108597711876';
$payment_mode='Debit Card';
$card_name='Maestro Debit Card';
$status_message='SUCCESS';
$bank_ref_no='327446';
$str="tracking_id : ".$tracking_id."\
payment_mode : ".$payment_mode."\
card_name : ".$card_name."\
status_message : ".$status_message."\
bank_ref_no : ".$bank_ref_no;
$qry ="UPDATE cb_all_state set comment='".$str."' WHERE id=1";
$sql=mysqli_query($connect,$qry);
I need to entry the string value as below format directly.
tracking_id : 108597711876
payment_mode : Debit Card
card_name : Maestro Debit Card
status_message : SUCCESS
bank_ref_no : 327446
But after update I am getting the following data inside the column.
tracking_id : 108597711876
payment_mode : Debit Card
card_name : Maestro Debit Card
status_message : SUCCESS
bank_ref_no : 327446
Here actually I need to entry the string value with /n
but it creates new line after update.