2 Little questions

I want to ask two little questions…

Question 1. How to put the below data in mysql through phpMyAdmin.
“2912x1994” (without brackets).
When I am updating this data in varchar assigned field, it shows error.

Question 2. How to get the as it is data from mysql.
like if we have Data like below without quotes
"
abc
def
etc. etc.

"

and I want to get it, as it is I mean they consist of line breaks, but fom simple echo command, I am just getting them in series not in line breaks.

Welcome to SitePoint Forums :)!

Question 1:
Use: INSERT INTO your_table_name (your_field_name) VALUES(“2912x1994”);

Question 2:
use the PHP function nl2br(), so just place your variable in this function, for example, echo nl2br($row[‘field_name’]); and it will render the linebreaks to HTML line breaks.

Thank you sir.
But your first answer is not working for me.
I have the table but data is not updating.

UPDATE ‘multiplication’
SET ‘display_result’=‘2912x1994’
WHERE id=1

your UPDATE statement, as posted, is trying to update a string, not a table, and you’re also trying to set a string, not a column

use this code instead:


UPDATE multiplication SET display_result = '2912x1994' WHERE id = 1

And to understand why I use it, r937 has a good answer.

Thanks to all of you sir.
I got the thing.
But sometimes, when i do this thing via phpMyAdmin to update this row, then it shows the error that string value is not correct.
But one time it accepted it.
Is this shows any error in my MySql software?