Hello,
I created a database as a study tool for some classmates of mine, and I just recently realized that I am a moron for not saving the entries in it with "\" slashes before them using the php addslashes(string) command. Now I have errors when running certain SQL statements on the data. I tried to write a script that would:
- Recurse every entry in the database (only around 500 as of now)
- Pull data that needs to be addslashed ans save to a variable
- use UPDATE sql command to resave entry with slashes.
It looks like it should work to me.. however when the script is run, the database does not appear to be updated. The data stored in it does not have slashes after runtime... Here is the code.. any help? (Also note when run, the "$display_block" that is printed on the html page DOES contain slashes as they should appear... they are just not getting updated or something in the DB)
I created a database as a study tool for some classmates of mine, and I just recently realized that I am a moron for not saving the entries in it with "\" slashes before them using the php addslashes(string) command. Now I have errors when running certain SQL statements on the data. I tried to write a script that would:
- Recurse every entry in the database (only around 500 as of now)
- Pull data that needs to be addslashed ans save to a variable
- use UPDATE sql command to resave entry with slashes.
It looks like it should work to me.. however when the script is run, the database does not appear to be updated. The data stored in it does not have slashes after runtime... Here is the code.. any help? (Also note when run, the "$display_block" that is printed on the html page DOES contain slashes as they should appear... they are just not getting updated or something in the DB)