I'm writing a perl/mysql script for work and I've done this plenty of times in php, but the servers at work don't have php available. I've got most of the code down with no problems. I have one concern though. I'm just wanting to submit data, two fields for now, into a mysql db. $question and $answer.
Do I have to escape characters to do like
INSERT INTO $table ($fields) VALUES ($values)
I know in php I always escaped stuff like ' , and " but it has a handy little function called addslashes I'm afraid I'm not that good with regex in perl to do a eregi type replace for those characters. Anyone know of a good resource about reading up on this? Or know if an equivalent function in perl, or better yet, if it's even necessary?
Any info/help is MUCH appreciated! Thanks way up in advance!
-----------
Crowe (crowe@lit.org)
Do I have to escape characters to do like
INSERT INTO $table ($fields) VALUES ($values)
I know in php I always escaped stuff like ' , and " but it has a handy little function called addslashes I'm afraid I'm not that good with regex in perl to do a eregi type replace for those characters. Anyone know of a good resource about reading up on this? Or know if an equivalent function in perl, or better yet, if it's even necessary?
Any info/help is MUCH appreciated! Thanks way up in advance!
-----------
Crowe (crowe@lit.org)