studgate Posted February 26, 2007 Share Posted February 26, 2007 I need some help creating a report page for a database, I tried to get some help before but it didn't work properly. I have a lot of rows in my table and would like to get the report page for only four of them, state, date, country & activity. The report page will contain four links & each time someone click on one it will get the data from the database & the number of times that field was added example: state Number city Number I really would like the help, thanks in advance. Link to comment https://forums.phpfreaks.com/topic/40089-help-creating-report-page/ Share on other sites More sharing options...
magnetica Posted February 26, 2007 Share Posted February 26, 2007 Use this: $query = "SELECT * FROM table WHERE column = 'value/variable'"; $results = mysql_query($query ); $line = mysql_fetch_assoc($results); And then to print out a specific column, simply type: echo ($line[column]); By the way when you echo each time it will automatically move to the next row in the table. Then obviously you can add a while loop to output while (condition) { code } Link to comment https://forums.phpfreaks.com/topic/40089-help-creating-report-page/#findComment-193952 Share on other sites More sharing options...
studgate Posted February 26, 2007 Author Share Posted February 26, 2007 what about the table to show the data in? & also what about the links? Thanks again but I need some more explanation or examples, I have been trying to do that but it is not working properly for me. Link to comment https://forums.phpfreaks.com/topic/40089-help-creating-report-page/#findComment-193979 Share on other sites More sharing options...
studgate Posted February 26, 2007 Author Share Posted February 26, 2007 Anything??? Link to comment https://forums.phpfreaks.com/topic/40089-help-creating-report-page/#findComment-194021 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.