markvaughn2006 Posted September 11, 2009 Share Posted September 11, 2009 I'm trying to make a simple text game with php/mysql, how do you make it so when a person logs in, he can only look at his tables? Like a person logs in, and clicks on his inventory, how do you make that inventory.php display that persons inventory in his mysql table? Thanks for any help!! Link to comment https://forums.phpfreaks.com/topic/173920-solved-display-mysql-tables-to-the-right-person/ Share on other sites More sharing options...
PFMaBiSmAd Posted September 11, 2009 Share Posted September 11, 2009 You use that person's identifying information as a condition in the WHERE clause in the query so that you only retrieve the rows you want to display. Link to comment https://forums.phpfreaks.com/topic/173920-solved-display-mysql-tables-to-the-right-person/#findComment-916807 Share on other sites More sharing options...
markvaughn2006 Posted September 11, 2009 Author Share Posted September 11, 2009 Thanks for the help! In this example $result = mysql_query("SELECT * FROM example") where would you put the WHERE command? Link to comment https://forums.phpfreaks.com/topic/173920-solved-display-mysql-tables-to-the-right-person/#findComment-916855 Share on other sites More sharing options...
PFMaBiSmAd Posted September 11, 2009 Share Posted September 11, 2009 http://w3schools.com/php/php_mysql_where.asp Link to comment https://forums.phpfreaks.com/topic/173920-solved-display-mysql-tables-to-the-right-person/#findComment-916863 Share on other sites More sharing options...
markvaughn2006 Posted September 11, 2009 Author Share Posted September 11, 2009 ahhhh, thank you!! Link to comment https://forums.phpfreaks.com/topic/173920-solved-display-mysql-tables-to-the-right-person/#findComment-916870 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.