export mysql result to excel
问题 I found a little script that will export information to an xls file, but I can't seem to get it working. The original code is found here: http://www.appservnetwork.com/modules.php?name=News&file=article&sid=8 And here's my code: // Query Database $query = 'SELECT * FROM #__db_clients WHERE published = '1' AND companyid IN (1,2) AND country = 'Africa' ORDER BY state ASC'; $db->setQuery($query); $rows = $db->loadObjectList(); if ($rows) { function xlsBOF() { echo pack("ssssss", 0x809, 0x8, 0x0,