Hi everyone
I'm back with my encryption problem!
Now, I've got as far as getting an encrypted value back from PGP.
Then I have an sql statement to put this thing into the mysql database. For example, it might be:
INSERT INTO CUSTOMER SET CUSTOMERID=NULL, SURNAME='Alderton', FIRST='Elizabeth', TITLE='Mr', ADDRESS1='', ADDRESS2='', ADDRESS3='', ADDRESS4='', TELEPHONE='00', FAX='00', EMAIL='weald@iol.ie', CODEA='E Alderton',
CODE1='¨PGPÁÁN+%³ÅOóý5¥ý{lßÙÀzYC‹èiUæað=´ó’ïb¾ó•7¯2àIØ&iËÙ8MîÛóÐ"ùÅ÷)ÅÆxxT…;ƒò6ÝÍIRÄOOËÖLnüÙ¸]OQQ/À¡<ö“¢’[ëŸÊß^qnýÇ EE9 ÌC&S¼´òÞ[é@½el¯ eíòéŽæ/jw§˜»Ä%à¥N3G ãÕ¶Ö×à—ñæ.üÄ€žåÛF’–ÁZ ä¦ÈM”Ê?À—îü¥"ï{{Ql0ê¦ïdµHvÌ?Rª>FlDÎøù…¤6ûC"ü€§dÈßqü;gn”nù4¦Ú7æ€@n¬Æf»%|nù0X]òâ¨KçÉÎôÈÚ…«…Ž‘"|Ô™Ý+ÜM~ˆ\½»kqsŽX w¸]Û1LL´”ïn¶Ù™,9V0OAÑÉú×?üº=ª0¦áÜì,ññ\ošblo¿øæØ{«Â†fTqê8½’I®¿j^ºj&2“-oS9ÞçΜ՛Áª{¦‡«ôõHåÛUä5@ÇøénÏ"ÜföFàìØŠzÝLüD1¾¯dœçâp9™»Œ.C¤qOlòGºfÿë £Sir2$R®ô°Û·î!Ç"Ùæ»®”ìDÈ'{-Ém©½½Sí—x UsœlYÇY,R»Àë( ÇÙu$†-ûkiP’—ÊëNØ„#ÊÔò+@<Á[Ú1;Iyf8d•›þ§ÕAŠ@÷¾%‹Ø ðžeB²þé•1‚•ÔcÔ$m ', CODEX='', CODEY='09/2002', CODEZ='Visa'
Now, I have a problem because the stray , and ' in the encrypted data fool the sql server into thinking it's reached the end of the value
Any ideas how I might solve this?
Does PGP have an algorithm which avoids these dodgy characters?
Is there a way of telling mysql to accept them anyway?
Thanks in advance.
Regards
Elizabeth