|
Posted by julian_m on 11/23/05 06:05
Chuck Anderson wrote:
> julian_m wrote:
>
> >Bob Stearns wrote:
> >
> >
> >
> >>Better than either:
> >>
> >>$sql = 'select * from articles where articles.id in ($arr_art_id)';
> >>mysqlquery($sql);
> >> //do whatever i have to do
> >>
> >>
> >
> >As you can imagine, I didn't know anything about "in".....
> >
> >thanks a lot
> >
> >
> >
> I've used IN for subqueries, but I'd never heard of using it with an
> array. Can you really use the array just like that? After trying to find
> more info on this, all I have seen indicates that you have to implode
> the array into a comma separated list.
>
> Si o no?
Efectivamente, tiene usted absoluta razón ; )
It doesn't work just including the array into the sql. I think that Bob
Stearns wrote a sort of pseudo-code (just as i did) to "show the road"
....
> *****************************
> Chuck Anderson · Boulder, CO
> http://www.CycleTourist.com
> Integrity is obvious.
> The lack of it is common.
> *****************************
By the way, a few days ago I saw in the news a guy who is travelling on
his bike all around the world. If you are interested, or even if you
want to improve your spanish, you can give it a look
www.acercandoelmundo.com
regards - julian
Navigation:
[Reply to this message]
|