Re: mysql statment

From: Date: Thu, 23 Aug 2001 21:51:48 +0000
Subject: Re: mysql statment
Groups: php.windows 
Request: Send a blank email to php-windows+get-9026@lists.php.net to get a copy of this message
Well, I've answered my own question! Apparently, you cannot use the addslashes function in the sql statement, not the way I am anyways. Does anyone know the proper way if any to do that without having to do a bunch of extra coding before every sql statment just to addslashes? Thanks! Angie >>> "Angie Tollerson" <Tollerson@alliancetechnologies.net> 08/23/01 04:41PM >>> >>> I guess the only thing windows related about this is that I have this whole setup on windows :) But I've tried to help out as much as I can on here so maybe someone will be kind to me :) Here goes: I have set up a mysql database column to be LongText (I've also tried LongBlob) and I tried uploading a block of text to it about 1000 chars in length thru my script. The sql statement died with a failure to execute. I cut the text in half and then it let me do it! So I assumed it was length. Which didn't make sense cuz the long fields don't have length restrictions. So I copy and pasted the same 1000 char data into my phpMyAdmin to upload it straight into the database that way, and it took it! Anybody have any ideas as to why my script might be doing this? I won't bother to put all the code in here, cuz it's just a simple update sql statment like this: UPDATE dictionary_pending set alt_spelling='addslashes($alt_spelling)', description='addslashes($description)'"; The description field being the one failing if it is too long. As you can see I tried adding slashes but to no avail..it really seems to be the length for my scripts but phpmyadmin doesn't care. Any ideas? Angie Tollerson Alliance Technologies Web Programmer (515)245-7628 tollerson@alliancetechnologies.net -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net For additional commands, e-mail: php-windows-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.windows (#9026) next »