 | |  | | | Photopost Pro Installation & Upgrades If you're having install or upgrade problems |
September 19th, 2006, 09:10 AM
|
#1 (permalink)
| | Member Verified Customer
Join Date: Oct 2002
Posts: 39
| auto_increment values were lost
I have had an sql problem with VB and lost the auto_increment values, and this has also happened to the gallery.
Which tables to I need to alter in the Photopost database?
Thanks
Robert
|
| |
September 19th, 2006, 09:13 AM
|
#2 (permalink)
| | Member Verified Customer
Join Date: Oct 2002
Posts: 39
|
Ho hum, forgot to mention....
// PhotoPost Pro Version Number
$VERSION = "5.3";
|
| |
September 19th, 2006, 10:11 AM
|
#3 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,706
|
without more information on what happened its hard to say
Almost every last table in Photopost's database has an auto_increment field.
|
| |
September 19th, 2006, 10:52 AM
|
#4 (permalink)
| | Member Verified Customer
Join Date: Oct 2002
Posts: 39
|
Chuck
What sort of info do you need?
The guys at VB Support just sent me an sql query which fixed the problem, snippet below.
ALTER TABLE `post` CHANGE `postid` `postid` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `productcode` CHANGE `productcodeid` `productcodeid` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT;
|
| |
September 19th, 2006, 10:55 AM
|
#5 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,706
|
well there is no info you have given us here. what tables are affected. You could issue similar queries but as stated there are many tables which ones are affected
ALTER TABLE `pp_photos` CHANGE `id` `id` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT;
|
| |
September 19th, 2006, 10:59 AM
|
#6 (permalink)
| | Member Verified Customer
Join Date: Oct 2002
Posts: 39
|
Chuck
With respect, the first sentence of my post #4 was "what info do you need"?
If you let me know what you need, I will gladly provide it.
|
| |
September 19th, 2006, 11:04 AM
|
#7 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,706
|
what tables are affected is what I have asked
|
| |
September 19th, 2006, 11:06 AM
|
#8 (permalink)
| | Member Verified Customer
Join Date: Oct 2002
Posts: 39
|
I don't know which tables specifically, which tables use auto_increment?
Rob
|
| |
September 19th, 2006, 11:09 AM
|
#9 (permalink)
| | Member Verified Customer
Join Date: Oct 2002
Posts: 39
|
For example.
We're sorry, but the system experienced an unrecoverable error. Please try again later.
Script:
Query: INSERT INTO pp_photos (id,user,userid,cat,date,title,description,keywords,bigimage,width,height,filesize,medwidth,medheight,medsize,approved,lastpost, watermarked,allowprint,extra1,extra2,extra3,extra4,extra5,extra6,ipaddress) values(NULL,'robert', 3, 500, 1158685930, 'test', 'test', 'test', 'IMG_2667.JPG', 640, 480, 79675, 600, 450, 47408, 1, 1158685930, 'no','no','','','','','','','')
Result: Column 'id' cannot be null
Database handle: Resource id #22
Last edited by snaketorque; September 19th, 2006 at 11:17 AM.
|
| |
September 19th, 2006, 11:18 AM
|
#10 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,706
|
How do you know your gallery has an issue at all if you dont know what tables are affected? You should be having errors which you would be posting here
16 out of 21 mysql tables in Photopost use auto_increment.
ALTER TABLE `pp_admlog` CHANGE `id` `id` INT( 12 ) UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `pp_favorites` CHANGE `id` `id` INT( 12 ) UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `pp_categories` CHANGE `id` `id` INT( 12 ) UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `pp_comments` CHANGE `id` `id` INT( 12 ) UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `pp_photos` CHANGE `id` `id` INT( 12 ) UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `pp_settings` CHANGE `id` `id` INT( 12 ) UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `pp_sort` CHANGE `sortid` `sortid` INT( 15 ) UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `pp_admingroups` CHANGE `id` `id` INT( 3 ) UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `pp_sortmem` CHANGE `sortid` `sortid` INT( 3 ) UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `pp_ecards` CHANGE `id` `id` INT( 25 ) UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `pp_notify` CHANGE `id` `id` INT( 15 ) UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `pp_users` CHANGE `userid` `userid` INT( 25 ) UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `pp_ipcache` CHANGE `id` `id` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `pp_extrafields` CHANGE `id` `id` INT( 12 ) UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `pp_photoextras` CHANGE `id` `id` INT( 12 ) UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `pp_usergroups` CHANGE `groupid` `groupid` INT( 12 ) UNSIGNED NOT NULL AUTO_INCREMENT;
EDIT: posting responses at the same time these above should help
|
| |
September 19th, 2006, 03:33 PM
|
#11 (permalink)
| | Member Verified Customer
Join Date: Oct 2002
Posts: 39
|
Problem solved.
|
| |
February 20th, 2007, 09:43 AM
|
#12 (permalink)
| | Member Verified Customer
Join Date: Sep 2003 Location: W.Yorkshire UK
Posts: 94
| Quote:
Originally Posted by Chuck S How do you know your gallery has an issue at all if you dont know what tables are affected? You should be having errors which you would be posting here
16 out of 21 mysql tables in Photopost use auto_increment.
ALTER TABLE `pp_admlog` CHANGE `id` `id` INT( 12 ) UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `pp_favorites` CHANGE `id` `id` INT( 12 ) UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `pp_categories` CHANGE `id` `id` INT( 12 ) UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `pp_comments` CHANGE `id` `id` INT( 12 ) UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `pp_photos` CHANGE `id` `id` INT( 12 ) UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `pp_settings` CHANGE `id` `id` INT( 12 ) UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `pp_sort` CHANGE `sortid` `sortid` INT( 15 ) UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `pp_admingroups` CHANGE `id` `id` INT( 3 ) UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `pp_sortmem` CHANGE `sortid` `sortid` INT( 3 ) UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `pp_ecards` CHANGE `id` `id` INT( 25 ) UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `pp_notify` CHANGE `id` `id` INT( 15 ) UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `pp_users` CHANGE `userid` `userid` INT( 25 ) UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `pp_ipcache` CHANGE `id` `id` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `pp_extrafields` CHANGE `id` `id` INT( 12 ) UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `pp_photoextras` CHANGE `id` `id` INT( 12 ) UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `pp_usergroups` CHANGE `groupid` `groupid` INT( 12 ) UNSIGNED NOT NULL AUTO_INCREMENT;
EDIT: posting responses at the same time these above should help | Just for anyone else having problems when moving from a newer version of mysql to an older version and losing the auto increment bit from the database, this post has been invaluble to me in fixing that problem, so a personal thanks from me regarding this one.
I moved from a host with mysql 4.1.19 to one with mysql 4.0.25 and this thread helped me fix the problem.
|
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Rate This Thread | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -5. The time now is 01:44 AM. | |