2
The intention of the query is to select all records of various tables when the ID is equal to the one passed in the parameter, echo of the SQL line displays the query below, the records exist, but does not return any.
The intention is to verify which of the tables is the record that has the ID of the sent parameter, but the tables have no relationship, only records that MAY BE that there is the ID, not that there can be the same ID in all, and the tables have the same structure, only names of fields are changed.
SELECT
*
FROM
`ax_det` a,
`ax_det1` ar,
`ax_det2` ca,
`ax_det3` im,
`ax_dete4` mo,
`ax_det5` na,
`ax_det6` te,
`ax_det7` tr,
`ax_det8` ve
WHERE
a.`aw_token` = '834545'
OR
ar.`ar_token` = '834545'
OR
ca.`ca_token` = '834545'
OR
im.`im_token` = '834545'
OR
mo.`mo_token` = '834545'
OR
na.`na_token` = '834545'
OR
te.`te_token` = '834545'
OR
tr.`tr_token` = '834545'
OR
ve.`ve_token` = '834545'
;
But what relates the lines of these 9 different tables?
– anonimo
Do these tables have the same columns? The same structure?
– Ronaldo Araújo Alves
the tables have different suffixes, and the intention is only to select the records, both have the same id in different tables, the relation is the id, but each of the tables does not depend on the others to work.
– ElvisP
@Ronaldoaraújoalves do not, only have equal id’s, but have different structure as placed in the WHERE condition.
– ElvisP
Right, and you need all the data from each table?
– Ronaldo Araújo Alves
@Ronaldoaraújoalves no, only id’s own field
– ElvisP
I get it. Edit the question and report it as it is relevant.
– Ronaldo Araújo Alves
@Ronaldoaraújoalves I’ve done it.
– ElvisP