Checking for duplicates in multiple tables (php, mysql)
Good time of day.
Guys, a question.
There are several tables, for example
Each table has a certain field(all different) which contains the string, say the name.
The point is to run through all the tables, look in the box to each table and look for overlaps and if ONE is already the same field, making it a +1. Ie, say I add the name of the News - there is a check on these tables and if there is one news or News-2 News-3, then add +1 to the already existing.
An example of one table
The question is how to do it on a bunch of tables with different fields in a convenient option?
Why many tables instead of one? Isn't it easier to use one table by adding new field, which will be able to classify data? - 05-12-2012 в 11:11:05
so originally it was done just wasn't necessary to check for uniqueness. remake makes no sense already. - 05-12-2012 в 11:17:26
But if these signs UNION with the necessary field to do (or in the view to render) and the result is to see - is not an option? - 05-12-2012 в 20:04:01
vskidku to make a table with metadata
to pull data from it and dynamically generate the SQL query. You can still play with directories of MySQL and try from there to get information about tables and fields
Answered: 05-12-2012 в 11:12:32
I was thinking that it may do so If there is a match in the tables to collect these matches into an array and it has to do sorting and look for the value which is the largest account? - 05-12-2012 в 11:19:05