tacojohn Posted June 11, 2003 Share Posted June 11, 2003 I\'m having troubles getting some records to update in the MySQL database. As soon as you change the values to all numeric nothing will update. I have 4 fields (ID, model, serial, and location). Each is set to submit as the following: ID: Integer (primary key) model: Text serial: Text location: Text In the database columns are set as: ID: INT (NOT_NULL) Primary model: TEXT (NOT_NULL) serial: TEXT (NOT_NULL) location: LONGTEXT (NOT_NULL) All the updating works fine as long as you keep all fields alphanumeric, as soon as you change one to strictly numeric after that nothing will update. I can\'t figure this out and I\'m new to PHP/MySQL. Please help. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/574-updating-records-in-mysql-database-using-dreamweaver/ Share on other sites More sharing options...
karassik Posted June 13, 2003 Share Posted June 13, 2003 You will have to build your own SQL statement: $sql=\"UPDATE tablename SET field1 = \'\".$_POST[\'field1\'].\"\', field2 = \'\".$_POST[\'field2\'].\"\' WHERE id_field = \'\".$_POST[\'id_field\'].\"\';\" ; Execute($sql); You should go to http://www.interakt.ro/products/catlist.php?id_pct=2 and download the PHAkt extention (free) which automates a whole lot of database interactions. You have to use a different type of connection to you MySQL database, but it as well is automated. There are tutorials on the site as how to use this powerful tool. hope this helps. Quote Link to comment https://forums.phpfreaks.com/topic/574-updating-records-in-mysql-database-using-dreamweaver/#findComment-1965 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.