Jump to content

Help Creating report page


studgate

Recommended Posts

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

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
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.