note 83649 added to function.mysql-fetch-assoc
| From: | help at osu1 dot php dot net | Date: | Fri, 06 Jun 2008 00:35:38 +0000 |
| Subject: | note 83649 added to function.mysql-fetch-assoc | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-140159@lists.php.net to get a copy of this message | ||
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?
----
Server IP: 209.41.74.194
Probable Submitter: 64.60.70.66
----
Manual Page -- http://www.php.net/manual/en/function.mysql-fetch-assoc.php
Edit -- https://master.php.net/note/edit/83649
Del: integrated -- https://master.php.net/note/delete/83649/integrated
Del: useless -- https://master.php.net/note/delete/83649/useless
Del: bad code -- https://master.php.net/note/delete/83649/bad+code
Del: spam -- https://master.php.net/note/delete/83649/spam
Del: non-english -- https://master.php.net/note/delete/83649/non-english
Del: in docs -- https://master.php.net/note/delete/83649/in+docs
Del: other reasons-- https://master.php.net/note/delete/83649
Reject -- https://master.php.net/note/reject/83649
Search -- https://master.php.net/manage/user-notes.php