note 83649 deleted from function.mysql-fetch-assoc by felipe
| From: | felipe@php.net | Date: | Fri, 06 Jun 2008 11:18:29 +0000 |
| Subject: | note 83649 deleted from function.mysql-fetch-assoc by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-140177@lists.php.net to get a copy of this message | ||
Note Submitter: help
----
function get_sotran01_by_salesmn($salesmn) {
require_once('database.php');
$sql ='SELECT DISTINCT
CUSTNO FROM SOTRAN01 ';
$sql.='WHERE SALESMN="'.$salesmn.'" ';
$sql.='AND SOSTAT!="C" ';
$sql.='AND SOSTAT!="V" ';
$sql.='ORDER BY CUSTNO ASC ';
$result=mysql_query($sql,$GLOBALS['db']);
$return=array();
while($row=mysql_fetch_assoc($result)){
$return[$row['CUSTNO']]=$row;
}
return $return;
this is the code but its not working. when i try to generate a report. its not giving me all the
rows of data. it gives me the customer number and sales order number and items details but if the
same item is in the same customer . it doesnt show. any reason why?