ListMailPRO Email Marketing Software Forums

ListMailPRO Email Marketing Software Forums => General Help & How-To => Topic started by: vrinfo on January 15, 2008, 06:00:00 am

Title: Database & script problems with auto increment fields
Post by: vrinfo on January 15, 2008, 06:00:00 am
Having tried to install ListMailPro on Windows 2003 Server and Mysql 5.0.37 ( I had to work around the install problems ) I am finding that the scripts do not work. There seem to be problems with the auto increment fields ( seen in the install and various places such as trying to send an email ). I have therefore reverted to trying to get a clean working install with viable table options.

Are there particular options I need to set on the mysql or php installations to make things work ? I am using PHP 5.2.1

Thanks

Notes :
When operating the install script - editconf.php it fails when trying the $cmd set on line 1363 to "INSERT INTO $ktable VALUES(''.'ex1','Example 1','ftp.... )

when executing this command from the mysql browser it does the insert but gives error number 1366 - Incorrect integer value: for column id at row 1.

My working assumption is that this behaviour varies by version of mysql / php etc.
Title: Auto increment problem
Post by: vrinfo on January 15, 2008, 07:23:24 am
Found the answer...

The issue affects certain versions of mysql running under Windows. The fix is to alter the php code from INSERT INTO... VALUES('',...
to INSERT INTO... VALUES(NULL,....

i.e. remove the hard blank with quotes and replace with a NULL for the auto increment field. This then results in successful inserts from ListMailPro...

Wish I hadn't had to find it out the hard way though....

Cheers

 :D
Title: Database & script problems with auto increment fields
Post by: DW on January 15, 2008, 06:59:28 pm
Greetings,

I was just about to suggest that!

There are, unfortunately, many other places in the ListMail code where the auto_increment is expected to work with '' instead of NULL.

A global search of all files for "insert into" should find all of the statements to modify.  Basically the first values field should be changed from '' (two apostrophes) to NULL

If you need help applying this fix you can submit your info here (http://listmailpro.com/support?t=other).

I have made a note for future updates.

Regards
Title: Also require fixes to 'null'
Post by: vrinfo on January 16, 2008, 12:34:10 am
I also found later in the testing cycle that I needed to replace instances of INSERT INTO ...with 'null' with NULL ( for instance in editfups.php ) in order to get the insertion working correctly....

Cheers