Error when running sql statement Error when running sql statement
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Error when running sql statement

Started by ogwasabi, September 09, 2006, 12:06:43 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ogwasabi

I'm having trouble recreating my database on my new host. I updated my gallery on my old host and dumped the data into an sql file. I have uploaded all my pictures and recreated the gallery (both galleries where v1.4.9) but I get the following error code when trying to run the sql statement on my new host.

#1136 Column count doesn't match row count at row 1

My guess is this has something to do with a difference in the number of columns in the table on my db and the number of values I have in my sql string for that particular line. I got this sql statement from a dump of my old db that was updated to v1.4.9 though. Why am I getting this error and what can I do to fix it? Thanks.


Nibbler

A fresh install of 1.4.9 won't have the same database structure as one that has been updated from previous versions. You should import both the data and structure from the backup.

ogwasabi

I see, that would mean that I need to also install the files/sub directories from v1.1 or whatever I was using before. Run the sql statement. Then go through the upgrade process?

Nibbler

Nothing to do with files. Just dump the data and structure from the database and then import them together.

ogwasabi

I think I understand but perhaps I'm a little slow. Forgive me. When you say structure, what are you refering to? I know that when I installed v1.4.9 it created tables in my db starting with cpg149. All the tables/data in my dump file start with cpg11d. Do I need to dump my files on the new db that begin with cpg149 and then run the sql statement to recreate the db? Should I blow away the gallery on my new host, run the sql statement then re-install the gallery?

Nibbler

Follow the moving instructions at http://coppermine-gallery.net/demo/cpg14x/docs/faq.htm#moveGallery

Then update the gallery as normal once it has been moved.

ogwasabi

I now get an error message when trying to access the gallery

While executing query "SELECT * FROM cpg149_config" on 0

mySQL error: Table 'ws40.cpg149_config' doesn't exist

Nibbler

You need to make sure include/config.inc.php contains the correct information to access the db coppermine is in.

ogwasabi