avraamG13 Posted May 3, 2009 Share Posted May 3, 2009 Hello again, Lets say i have 2 diferent tables, players: id_player name_player players_selections_cat: id_player positions I have a form that will submit in table 'players_selections_cat' some info, but i want to check from table 'players' row 'id_player' (this has ONLY numbers) if the 'id_player' is on the database to enter the info i want or else show a message that the info im trying to enter is not exist in the database I hope you understant Thank you Quote Link to comment https://forums.phpfreaks.com/topic/156662-check-from-2-tables-and-then-enter-to-the-database/ Share on other sites More sharing options...
Ken2k7 Posted May 3, 2009 Share Posted May 3, 2009 SELECT `id_player` FROM `players` WHERE `id_player` = '$some_id' LIMIT 1 Quote Link to comment https://forums.phpfreaks.com/topic/156662-check-from-2-tables-and-then-enter-to-the-database/#findComment-824992 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.