I have a very small problem that I hope you will be able to help. I have searched for hours in internet and its driving my crazy !! I have a simple Table (called pn_quarkpag) in a mysql database, one field contains part_numbers and the other is page_numer, which is empty ( that should contian just numbers) All I want to do is use a simple command in mysql database to look for all occurences of a word like SRT1, SRT2, etc in part_number filed and insert a value of 10 in the page_number field. I am using: insert into pn_quarkpage (page_number) values (10) where part_number like 'SRT%' ; HTML: CAn you please tell me what am I doing wrong. Thanks Jacka
Yes, the insert statement is used to insert rows, not column values. You should use the update statement to do that... update pn_quarkpage set page_number = 10 where part_number like 'SRT%'; Code (markup):
Wowwwww, what a result. many thanks ecentricNick. It worked first time. Thanks for you too for looking at my problem so quickly. I was getting error in "where part_number like 'SRT%", but its solved now. Thats one command I will never forget. cheers mate