kevincro Posted October 19, 2007 Share Posted October 19, 2007 I can't seem to find the right command. What I want to do is check to see if a value is present in a database using php. Quote Link to comment https://forums.phpfreaks.com/topic/73914-checking-to-see-if-a-value-exists-in-a-table/ Share on other sites More sharing options...
Michan Posted October 19, 2007 Share Posted October 19, 2007 Use a query to select the appropriate row from the database, then check to see if it's there, by: if (!$mysql['column']) $present = "There is no entry."; else $present = $mysql['column']; Quote Link to comment https://forums.phpfreaks.com/topic/73914-checking-to-see-if-a-value-exists-in-a-table/#findComment-372988 Share on other sites More sharing options...
Daniel0 Posted October 19, 2007 Share Posted October 19, 2007 http://dev.mysql.com/doc/refman/5.0/en/select.html Quote Link to comment https://forums.phpfreaks.com/topic/73914-checking-to-see-if-a-value-exists-in-a-table/#findComment-372997 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.