goodluck4287 Posted April 25, 2009 Share Posted April 25, 2009 I am working on a project where I have downloaded several thousand patents from the USPTO and to make a long story short, I have reimported them into my own database. The basic structure, (I am using all InnoDB), uspto.patents. In patents, I have a PK called Patent_ID, and then I have Patent_Abstract, Patent_Title, and Filed Date. Patent_ID has some letters so unfortunately I am using varchar(7) instead of a numeric value Patent_Abstract and Patent_Title are text Filed_Date is correct sql date format A couple of things that I would like to run on my db are: I would like to search for terms/keywords that appear in either of the fields Patent_Abstract or Patent Title. For example, I would like to search for "Solar Panels" or "*Solar" in either in the Patent_Abstract or Patent_Title. If the terms do not appear in the search results, I would like there entire record based on the PK deleted (nulled is fine). So if those search terms aren't found for that record, delete that particular Patent_ID, Patent_Abstract, Patent_Title, and Filed_Date. I would also like to be able to count records based on a range or dates. I've created this db, but I"m a noob at searching it and figuring out these logical sql queries. Thanks for any help. Link to comment https://forums.phpfreaks.com/topic/155642-searching-in-my-database-would-like-some-help-with-the-sql-query/ Share on other sites More sharing options...
fenway Posted April 27, 2009 Share Posted April 27, 2009 What do you have so far? Link to comment https://forums.phpfreaks.com/topic/155642-searching-in-my-database-would-like-some-help-with-the-sql-query/#findComment-819976 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.