Moving/Displaying Dynamic Stuff

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ibanez270dx
Forum Commoner
Posts: 74
Joined: Thu Jul 27, 2006 12:06 pm
Location: Everywhere, California

Moving/Displaying Dynamic Stuff

Post by ibanez270dx »

Hi,
I think I can work my way around a perticular problem, but I don't know how it would translate to code... This is what I want to do:

- First I want to extract some information from the database (pretty easy)

Code: Select all

$sql = "SELECT * FROM downtime WHERE aircraft_id='$view_id' AND dwntime_year='$year' AND dwntime_month='$month' ORDER BY '$listorder'";
- Next I want to create an array for every selected row

Code: Select all

$therows .= array(
<center>$dwntime_type</center>,
<center>$dwntime_date</center>,
<center>$dwntime_times</center>,
<center>$dwntime_hrs</center>,
<center>$dwntime_ata</center>,
<center>$dwntime_reason</center>,
<center>$dwntime_solution</center>,
<center>$dwntime_log</center>,
<center>$dwntime_log_by</center>);
- Then I want to take each array and put some static code next to it (I know this is wrong, but you kinda get an idea... I also have another file that defines the fuction used in the line below)

Code: Select all

$display = "$therows(but only 1 row at a time) $excel->writeLine($therows)";
- That should be it. I am going to take that $display value and process it a little later in the script to make an Excel file.

Any help is greatly appreciated!
Post Reply