hello
i have made code that is working and using join function
[php]
SELECT * FROM link_ads
INNER JOIN user_ads_history
ON link_ads.uid = user_ads_history.uid
[/php]
it displays link_ads elements which aren’t in user_ads_history.uid that is working
my question is
how can i unite more tables like that? and also i need select only that rows where ad_amount >=1
i have tried all these options
[php]
SELECT * FROM link_ads WHERE ad_amount>=1
INNER JOIN user_ads_history
ON link_ads.uid = user_ads_history.uid
[/php]
[php]
SELECT * FROM link_ads WHERE link_ads.ad_amount>=1
INNER JOIN user_ads_history
ON link_ads.uid = user_ads_history.uid
[/php]
[php]
SELECT ad_amount FROM link_ads WHERE link_ads.ad_amount>=1
INNER JOIN user_ads_history
ON link_ads.uid = user_ads_history.uid
[/php]
ERROR: Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in
and also after that i need to same thing but with other tables
my code:
[php]
SELECT * FROM link_ads WHERE link_ads.ad_amount>=1
UNION ALL
SELECT * FROM code_ads WHERE code_ads.ad_amount>=1
INNER JOIN user_ads_history
ON link_ads.uid = user_ads_history.uid
INNER JOIN user_ads_history
ON code_ads.uid = user_ads_history.uid
[/php]