<code><pre>
SELECT
bs.bid AS id,
bs.bname AS bname,
bs.blocation AS bloc,
bs.btype AS btype,
bs.bcontact AS bcontact,
bs.bnature AS bnature,
bs.bturnover AS bturnover,
bs.bdate AS bdate,
bs.bcdate AS createdate,
bs.bstatus AS bstatus,
ad.astreet AS bstreet,
ad.atown AS btown,
ad.adistrict AS bdistrict
FROM
oa_business AS bs
INNER JOIN
oa_address AS ad ON bs.blocation = ad.aid
WHERE
(ad.astreet LIKE '%2%')
ORDER BY bname ASC
</pre>
</code>
Asked
Active
Viewed 30 times
0
-
@Cid sorry it actaully "Unknown column" – Kanneh Mar 07 '22 at 07:20
-
Most likely explanation is that your php code isn't looking at the same copy of the database that workbench is. Either that or you're not executing the php code you think you are. – ADyson Mar 07 '22 at 07:26
-
@ADyson Thank you very much you made me look deeper and the error is from another line using the same filter which is not a join. – Kanneh Mar 07 '22 at 07:39