![]() |
Sergey Kornilov admin 5/27/2022 |
I think the easiest option is to create two buttons and hide one of them based on the condition. In order to determine if the gamer was already favorited or not you can either perform an additional SQL query for each record or you can modify the original SQL query joining favorite_users via LEFT OUTER JOIN. The joined column will either have an ID of the user/gamer or null. |
W
|
wfcentral author 5/27/2022 |
modify the original SQL query joining favorite_users via LEFT OUTER JOIN. The joined column will either have an ID of the user/gamer or null. I tried this solution as it seemed easier. Now if other people have also favorited this gamer they show up twice or more on my list. So, it seems I need something like a JOIN where it is also looking for logged in user id in the favorite_users table - but, I don't know how to put PHPRUNNER values into the mysql statement. |