On 8/19/05, Richard Lynch [EMAIL PROTECTED] wrote:
On Fri, August 19, 2005 12:56 pm, areguera wrote:
could you suggest something about Latin characters and portability?.
As I understand it, or not, more likely, you want to configure your
MySQL server to use UTF-8, and your MySQL client to
Please always reply to the list so that others can benefit from the
exchange. As it happens, I'm not exactly very knowledgeable about
character sets, so someone on the list may be able to offer more help
with regard to the problem you're experiencing.
-Ben
areguera wrote:
On 8/19/05, Ben
sorry...here is the message
On 8/19/05, areguera [EMAIL PROTECTED] wrote:
On 8/19/05, Ben Ramsey [EMAIL PROTECTED] wrote:
Alain Reguera Delgado wrote:
you could try:
1. get all form variables into an array
fine
2. validate values
Good, but do this step as you put the
On Fri, August 19, 2005 12:56 pm, areguera wrote:
could you suggest something about Latin characters and portability?.
As I understand it, or not, more likely, you want to configure your
MySQL server to use UTF-8, and your MySQL client to use UTF-8 and
pretty much everything to use UTF-8, and
Commas are no problem within strings. You might have an apostrophe, which
SQL assumes is the end of the string literal. That was answered by Chris
already, I just wanted to clarify the problem.
You don't need to insert NULL in indx. If indx allows NULL and has no other
default value nor is
Jon [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Please help with an insert problem.
Sometimes $data1 could have a comma and that messes up the insert. how do
I
get around that?
$query = insert into testtable6 (indx, col1, col2) values (NULL,
'$data1',
'$data2');
Dan Baker wrote:
You are looking for the addslashes function. It prepares data for
database querys:
Better yet, don't use addslashes(). Use the escaping function that is
specific to the database you're using. In this case, it's
mysql_real_escape_string(). This is much better than using
you could try:
1. get all form variables into an array
2. validate values
3. convert all values into entities using htmlentities()
4. build sql query (do some tests 'til get it right)
5. execute the built query (with proper db function)
by now, commas aren't a problem, they are limited between
Alain Reguera Delgado wrote:
you could try:
1. get all form variables into an array
fine
2. validate values
Good, but do this step as you put the values into a separate array,
don't put all the values into the array first and then validate them
later... make sure the input received is
Ben Ramsey wrote:
You don't need to convert the values to HTML entities when saving to a
database. That's not going to prevent this problem.
Furthermore, you don't need to use htmlentities() if you specify your
character set properly and all the characters you are outputting are in
your
10 matches
Mail list logo