Date: 08/15/00
- Next message: John Miller: "[PHP] compiling apache with php"
- Previous message: David Robley: "Re: [PHP] re:Pinging from php srcipt"
- In reply to: Chad Day: "[PHP] Help with multidimensional array setting up a mysql query.."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Chad
you can use something like this:
$subquery = substr($subquery, 0, -1);
which just chops off the last character from the string.
rgds
-
Jason Wong
Digital View Ltd
2201 Nanyang Plaza
57 Hung To Road
Kwun Tong
HONG KONG
Tel: +852-2861-3615
Fax: +852-2520-2987
www.digitalview.com
> -----Original Message-----
> From: Chad Day [mailto:cday <email protected>]
> Sent: 15 August 2000 22:47
> To: 'php-general <email protected>'
> Subject: [PHP] Help with multidimensional array setting up a mysql
> query..
> The problem is that the statements are printing out like:
>
> SELECT ABEPN, CABEPN, DESCRIPTION, QUANTITY, PRICE, from abeparts where
> ABEPN like PARTNUM
> SELECT GUDENPN, CGUDENPN, DESCRIPTION, PRICE, from gudenparts
> where GUDENPN
> like PARTNUM
>
> which is REALLY CLOSE to what I want. The problem is the last array
> element, (PRICE).. it adds the comma after it, which I
> understand why it
> does. I just don't know how to write something to say "Hey,
> this is the
> last element in the array, so $subquery .= " $val", not $subquery .= "
> $val,".
>
> I tried to get a count or sizeof the array, and I could loop
> based on that
> easily, but for some reason I can't seem to obtain the count/sizeof my
> multidimensonal arrays correctly. Can anyone help?
>
> Thanks,
> Chad
>
>
> Chad Day
> Beach Associates
>
> When I speak german... I think german in my head... but
> like...Do skript
> kiddies see a w40l3 8uncha 1's and 0's and 3's and 4's and 7's in their
> h34d'5 w43n t43y R +a1k1n6 ? -- SirStanley
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe <email protected>
> For additional commands, e-mail: php-general-help <email protected>
> To contact the list administrators, e-mail:
> php-list-admin <email protected>
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: John Miller: "[PHP] compiling apache with php"
- Previous message: David Robley: "Re: [PHP] re:Pinging from php srcipt"
- In reply to: Chad Day: "[PHP] Help with multidimensional array setting up a mysql query.."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

