What I have: The following structure:
table_zero
-> id (PRIMARY with auto increment)
-> other
table_1
-> id (foreign key for null table identifier)
-> varchar (80) Example value: (aahellobbb)
-> one_field
table_2
-> id (foreign key for null table identifier)
-> varchar (160) Example value: (aaececehellobbb)
-> other_field
What I want: Find and get an array (id, varchar) containing all matches with LIKE '% str%' in the varchar field. For example, if I look for the string "hello" ... I should get both example values ββwith their identifiers. These identifiers will always be different, as they are links to the PRIMARY KEY.
What have I tried . I tried to use UNION ALL, but in my example it does not work with LIMITS.
mysql select union database-table
Mark tower
source share