Help with PHPExcel Library and mySQL data from a table
Posted
by
user547363
on Stack Overflow
See other posts from Stack Overflow
or by user547363
Published on 2010-12-19T00:19:28Z
Indexed on
2010/12/21
21:54 UTC
Read the original article
Hit count: 168
Hello! Everyone..
I have this script
$query = "SELECT id,last_name,first_name FROM users WHERE tmima_id='6'";
$result = @mysql_query($query);
while($row = mysql_fetch_array($result))
{
$i = 3;
$emp_id = $row['id'];
$cell = 'A'.$i;
$objPHPExcel->setActiveSheetIndex(0)
->setCellValue($cell, $row['last_name']. $row['first_name']);
$i++;
}
But in the .xls file it prints only one user. Why id doesnt print all of the users ? W
Thanks in advance.
© Stack Overflow or respective owner