Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Need 911 Help with MYSQL Statement


Guest

Recommended Posts

Posted

I had a real life nightmare the other day where someone got into my system and deleted my products table, images folder, and my server side backups! :'( My PC backup was corrupted and I was only able to save a portion of the products. They were not linked to any categories and I just finished sorting them into the proper ones. I have around 1700 products that were saved and about 4700 that were partially restored. This leads me to the problem. The partially restored products are not linked to a category, have no title or description, only a part number and price and are still appearing in the new products section. So I need some sort of Sql script that will delete all products that do not have a title entirely including from specials and new products. Can anyone help me with this please!!!?? :blush:

'

 

Thanks in advance!!!

Posted

My first suggestion is for you to contact the person hosting your site and request a full backup of the most recent data, maybe they could only backup the database?

Posted

Hi jason, how do you plan to restore the products that are only partially in your database?

 

I'm not sure I understood you correctly: do you plan to delete these orphans from your database or just exclude from queries? If you plan to exclude them, I'm surprised they would be in the specials selection, as that query uses a join to products_description table.

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Posted

There is no saving the products that are only partially there. So I need to delete them. The problem is that I need to delete only the products that are incomplete eg. no title. I just need to get rid of them so that they do not exist anywhere in the database and I can start re-entering products from there.

Posted

Jason, the procedure would depend on database version ... while > 4.1 supports subselects, older versions would need a php script written. As we have many tables with product info, and if you are not experienced in writing database scripts, I suggest you ask your host or a trusted person for help in this.

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Posted
Jason, the procedure would depend on database version ... while > 4.1 supports subselects, older versions would need a php script written. As we have many tables with product info, and if you are not experienced in writing database scripts, I suggest you ask your host or a trusted person for help in this.

 

Hate to say it but my server guy isn't great with mysql, just with everything else. lol. Which is why I've had to resort to asking on here. I know that the MYSQL is MySQL 4.1.10-nt-max-log from the server info page. you can go to the site http://www.driftfactory.com to see what I am talking about.

Posted

I understand the issue, Jason ... I have seen this kind of a selection screen before :-). That's why I suggested asking a host or dev guy about it.

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Posted
I understand the issue, Jason ... I have seen this kind of a selection screen before :-). That's why I suggested asking a host or dev guy about it.

 

Thanks Monika. Hopefully a dev guy will wander though and give me a hand because I have no idea who to ask at this point :blush:

Posted

Ok here is my plan now. Download the entire product database into a dab delimited file. Sort it out in excel and re-upload. Has anyone done this?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...