PDA

View Full Version : switching databases


notset4life
3-30-04, 09:40 PM
Because of the clutter in my database, I added a new one to my powweb package

Originally, the database was titled...let's say DATABASEONE.

I added DATABASETWO and moved all the oscommerce files to that db so I didn't need to use prefixes, and most things work.

However, a few things causes errors such as this:

Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /www/c/mywebsite/htdocs/catalog/catalog_products_with_images.php on line 346
1146 - Table 'databaseone.configuration' doesn't exist

The table should be databasetwo...I believed it is called from configure.php. This only happens on NON ssl pages...it works fine on SSL pages.
My configure file is correctly pointing to databasetwo. Can anyone tell figure out why scripts are pointing to the original database???

TIA
Vin

natural
3-31-04, 09:11 AM
did you make changes in the configure.php in tha catalog and admin directories?

notset4life
3-31-04, 09:22 AM
Originally posted by natural
did you make changes in the configure.php in tha catalog and admin directories?

Yes. Both configure.php have this:

define('DB_DATABASE', 'DATABASE2'); define

I can't figure out why I'm getting the error message.

natural
3-31-04, 09:28 AM
Originally posted by notset4life
...

However, a few things causes errors such as this:

Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /www/c/mywebsite/htdocs/catalog/catalog_products_with_images.php on line 346
1146 - Table 'databaseone.configuration' doesn't exist


Did you look at the line 346 in catalog_products_with_images.php?
Maybe you have harcoded the DB_NAME there?

notset4life
3-31-04, 05:21 PM
I figured out what it was. I was using a banner in the header and calling it with a script. The banner disappeared when in SSL, do that's why it worked, but in non-ssl, the banner script somehow interfered.

Thanks

natural
3-31-04, 05:42 PM
glad you got it to work :)