Hi, I want to add a field in a table which i am doing by: mysql_query("ALTER TABLE `site_details` ADD vat_no int(15)"); PHP: Which is fine to add the field but i was wondering if there is a way in adding this after another field that i specify? Cheers, Adam
If you want to learn some mysql, a good thing is to look at the query that phpmyadmin generates. So create the table in phpmyadmin, and look at the resulting sql.
dimitar christoff is right, and I agree with premiumscripts, if you want to learn some mysql syntax, you can use phpmyadmin and look at generated query.. for add field in table after a field, you can user this syntax (for example, you add field named new_field_name for varchar as type data in table table_name, and insert it after field old_field