Knowledgebase

Portal Home > Knowledgebase > Articles Database > Inserting full stops into a MySQL database


Inserting full stops into a MySQL database




Posted by Phalanxer, 07-15-2012, 01:12 AM
How does one use full stops when inserting data into MySQL? INSERT INTO tablea (history, number1, number2, number3) VALUES(50.. , 0, 7, 4); The two full stops after '50' in the above is an issue. I have tried using backslashes along with looking on Google for the answer but can't find it. Does anyone know how it can be done? The end result should be something like this: echo $row['history']; '50.. 27.. 24.. foobar.. '

Posted by Phalanxer, 07-15-2012, 01:44 AM
Never mind, I initially wrapped it in quotes correctly, but my string wasn't executing and thought there was something wrong with the string itself. This head aches solved. Thanks for reading.

Posted by josephgarbett, 07-15-2012, 10:31 AM
You can insert Intergers without escaping or wrapping, if the data inserted in not an Integer, it's needs wrapping and symbols need escaping depending on the character type

Posted by teamhostersbill, 07-18-2012, 10:38 AM
If your value contains fullstops , include it in quotes. Otherwise it will show error. Because . Is not an integer.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read


Language:

Contact us