Freid001 Posted October 14, 2010 Share Posted October 14, 2010 Ok I was wondering is there a way I can select a mysql database, and order it but only show data of a certain criteria: for example Mysql database: ID | User | XP | Won | Lost 1 Freid 100 1 4 2 Smic 300 5 4 3 Retna 300 3 2 4 OBW 200 3 2 And then some php code that will retrieve this information but only display the users that have lost = 4 in a list. In other words some php code that will only list the players Freid and Smic from the msql database becuase they have Lost = 4 the code would not show Retna or OBW becuase there Lost is not = to 4 Any help would be great thanks Freid001 Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted October 14, 2010 Share Posted October 14, 2010 SELECT * FROM some_table WHERE lost >= 4 Quote Link to comment Share on other sites More sharing options...
gizmola Posted October 14, 2010 Share Posted October 14, 2010 Databases wouldn't be very useful if you couldn't provide criteria to them and get back result sets. Fire up your mysql command line or phpMyAdmin and do some queries so you can understand the process. I don't know what your table name is, so I called it usersummary in this example: SELECT * from usersummary WHERE Lost = 4 ORDER BY XP Quote Link to comment Share on other sites More sharing options...
Freid001 Posted October 15, 2010 Author Share Posted October 15, 2010 thx 8) Quote Link to comment 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.