I have a column(varchar) in my db that stores a number for each member, e.g. 40001. Is there a way to delete the first number (4) for each row?
It probably depends on the DBMS, but you could try something along the lines of: UPDATE tablename SET colname=SUBSTR(colname, 1)
Excellent!!! (colname, 1) didn't work, but i replaced 1 with 2 and it did exactly what i wanted. Thanks a lot mate!
can i do exactly the same thing with php?
Yes, use [man]substr/man.