im installing a script and part of the install.php does table creation etc. i get this error ERROR could not update your products model field length. this is the line from in the install file, note it does create about 5 tables before it gets this error $sql = 'ALTER TABLE `products` CHANGE `products_model` `products_model` VARCHAR(24) NULL DEFAULT NULL'; if (db_query($sql)){echo "<br> Successfuly updated your products model field length <br>";}else{ echo "<font color=red > <br> ERROR: could not update your products model field length </font><br>"; } any help welcomed
ALTER TABLE is failing what is the current table definition of 'products_model'? show desc products_model
The query is fine. I believe products table does not have products_model column or possibly wrong database is chosen for query.. Please modify a code little for debug purpose like this. $sql = 'ALTER TABLE `products` CHANGE `products_model` `products_model` VARCHAR(24) NULL DEFAULT NULL'; if (db_query($sql)) { echo "<br> Successfuly updated your products model field length <br>"; } else { echo "<font color=red > <br> ERROR: could not update your products model field length </font><br>"; echo mysql_errno() . ": " . mysql_error(). "\n"; } PHP: