INSERT INTO Statement

Post your support requests/solutions for phpMySQLAutoBackup [website]
Cam
Seems to be staying... Lets see...
Seems to be staying... Lets see...
Posts: 4
Joined: Fri Aug 11, 2006 6:37 am
Contact:

INSERT INTO Statement

Postby Cam » Fri Aug 11, 2006 7:09 am

When completing a MySQL backup manually the "INSERT INTO" statement is on each line of the created file, when completing with phpMySQLAutoBackup the "INSERT INTO" statement is only on the first row. Examples below.

Manual Backup

Code: Select all

INSERT INTO `dir_categories` VALUES (1, 'Some text here', 'n', 0);
INSERT INTO `dir_categories` VALUES (2, 'Some text here', 'y', 1);
INSERT INTO `dir_categories` VALUES (3, 'Some text here', 'y', 1);


phpMySQLAutoBackup

Code: Select all

INSERT INTO `dir_categories` VALUES (1, 'Some text here', 'n', 0),
(2, 'Some text here', 'y', 1),
(3, 'Some text here', 'y', 1);


Could the latter backup file cause a problem should the need arise to restore my database, and is there some code I could change so the output would match the manually created file.

davidgwalker
MODS thats what I do that is! But definately NO mod music! It has to be ROCK!
Posts: 1807
Joined: Mon Oct 25, 2004 8:20 pm
Location: Huddersfield, UK
Contact:

Postby davidgwalker » Fri Aug 11, 2006 8:44 am

Hi and welcome,

You can change the extended inserts by completing the following:

Edit file: phpmysqlautobackup_extras.php
Change line 37 from:
$extended_ins = "yes";
to
$extended_ins = "no";

Hope that helps - you should test your backups by restoring to a test server BEFORE you need them then you will know they work, or not!!

Cheers

Dave.

Cam
Seems to be staying... Lets see...
Seems to be staying... Lets see...
Posts: 4
Joined: Fri Aug 11, 2006 6:37 am
Contact:

Postby Cam » Fri Aug 11, 2006 9:21 am

Thanks for the info, and thanks for a great script.

Cam
Seems to be staying... Lets see...
Seems to be staying... Lets see...
Posts: 4
Joined: Fri Aug 11, 2006 6:37 am
Contact:

Postby Cam » Fri Aug 11, 2006 9:56 am

Just tried the above and the file I receive still has the extended inserts.

davidgwalker
MODS thats what I do that is! But definately NO mod music! It has to be ROCK!
Posts: 1807
Joined: Mon Oct 25, 2004 8:20 pm
Location: Huddersfield, UK
Contact:

Postby davidgwalker » Fri Aug 11, 2006 11:43 am

try commenting out that line:

//$extended_ins = "yes";

Cam
Seems to be staying... Lets see...
Seems to be staying... Lets see...
Posts: 4
Joined: Fri Aug 11, 2006 6:37 am
Contact:

Postby Cam » Fri Aug 11, 2006 12:17 pm

You are a star, works perfect. :)

Thanks again.


Return to “phpMySQLAutoBackup [forum]”

Who is online

Users browsing this forum: No registered users and 2 guests