PHP/MySQL questions

vinnie

[H]ard|Gawd
Joined
May 1, 2002
Messages
1,274
Few quick things please.

First of all... eliminating quotation and apostrophes in input, or letting them be stored. Security isn't the issue, the system is only accessible internally, it just doesn't like them at the moment. Simple way of dealing with this?

Second question... changing the autoincrement number on mysql tables. I hit a few too many 00's in my job number and want 10000 instead of 1000000 like it is at the moment... any way of doing that without drop table/create table?

Lucky last... still on autoincrement... been using them for testing. Want to reset my numbers to start ending with 00 again... they're up to 78 or something now on one table, 13 on the other.

Thanks for taking the time to read folks :)
 
1. put a \ before it i.e. \" will work in queries and such and shouldnt make any difference

2. i dont get what you mean

3. i think you need to empty the table or change the cardinality (?) on the key, or both. its in a box under the table display in phpmyadmin.
 
Originally posted by Desova
1. put a \ before it i.e. \" will work in queries and such and shouldnt make any difference

2. i dont get what you mean

3. i think you need to empty the table or change the cardinality (?) on the key, or both. its in a box under the table display in phpmyadmin.
1. on the page that gets the form data, use the addslashes() function
2/3 i'm not sure exactly what you want to do, but to change the auto increment number, the sql is "ALTER TABLE tbl_name AUTO_INCREMENT = #"
 
Back
Top