On Thu, October 27, 2005 4:26 am, Danny wrote:
> I´ve got a connection, to a MySQL db, and get the following
> ResultSet(Category | Name | Code | City)
> Customers | John | A36 | New York
> Customers | Jason | B45 | Los Angeles
> Customers | Max | A36 | Paris
> Providers | John | A36 | London
> P
Thank you very much
I think it will work, because my problem seems to be with "if" operators and
order...
Thanks again
On 10/27/05, Adrian Bruce <[EMAIL PROTECTED]> wrote:
>
> ok, so i assume that customers is a grouping of some sort and that in
> some cases you may come accross a row like "Staf
if your db is built correctly you could use
UNION or JOIN(S) to build the correct query.
otherwise look into DISTINCT(ROW) and/or creating
temporary tables.
formatting the info later is, as adrian illustrated,
up to you.
t.
ps. all the above depends on your mysql server version and
configuration
ok, so i assume that customers is a grouping of some sort and that in
some cases you may come accross a row like "Staff | John | A36 |LA ".
It may not be a perfect way of doinig it but this is what i would
generally try:
while ($row = mysql_fetch_array($resultset, MYSQL_NUM)){
if($ro
Thanks for your help Adrian, but the problem is that I need to show row[0]
once (Customers text are repeated), and below the details of the records
Your solution shows:
Customers | John | A36 | New York
Customers | Jason | B45 | Los Angeles
(...)
And I need
Customers
John | A36 | New York
Jason |
load each row of the resultset into an array $row using
mysql_fetch_array(), each field in the result set row will be held in
the corresponding array element.
while ($row = mysql_fetch_array($resultset, MYSQL_NUM)){
echo"$row[0] | $row[1] | $row[2]";
}
Hope this helps,
Ade
Danny wrote:
Hi All,
I´ve got a connection, to a MySQL db, and get the following
ResultSet(Category | Name | Code | City)
Customers | John | A36 | New York
Customers | Jason | B45 | Los Angeles
Customers | Max | A36 | Paris
Providers | John | A36 | London
Providers | Mark | B67 | Madrid
And I need the report
7 matches
Mail list logo