Thanks, Bastien > On Nov 18, 2013, at 2:55 PM, "Camilo \"Zabyer\" Lozano III" <admin@xxxxxxxxxx> wrote: > > I suggest create a function & stored procedure for that process... > > > > >> On Tue, Nov 5, 2013 at 10:40 PM, Camilo Sperberg <unreal4u@xxxxxxxxx> wrote: >> >> >>> On 05 Nov 2013, at 10:23, Anton Heuschen <antonfh@xxxxxxxxx> wrote: >>> >>> Good day, >>> >>> I am trying to find a way, how I can look for one row in a table with a >>> search for the id, but then I use this to give me the INSERT statement >>> (which creates this row again) Consider the use of the REPLACE INTO statement which may better handle your situation >>> >>> What I am trying to do, is get an audit where any update - checks the >> state >>> of a row, saves it as its INSERT statement and saves this to an audit >> file >>> . >>> >>> >>> Regards >>> >>> Anton >> >> This is more a MySQL related question than a PHP one... >> >> From what I know, there is no way to make MySQL generate an insert >> statement from an existing row. The only way that I know about would be >> invoking mysqldump. >> >> If you want an audit log, I suggest you better take a look at the binary >> logs from MySQL, combining automatic backups+binary log you can easily >> re-assemble the structure of a table/database. Plus, the binary log has >> everything you want: it logs dates and times, the exact executed queries >> and you can easily take snapshots from that. >> >> Greetings. >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php > > > -- > ============================= > MetaCatalyst Web Development Team > http://www.metacatalyst.com > http://www.metacatalyst.org > > Zabyer Community > http://www.zabyer.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php