List:General Discussion« Previous MessageNext Message »
From:Tomás Abad Fernández Date:January 12 2007 8:25am
Subject:RE: Need any that can translate this
View as plain text  
 


Oh my god it work.Thank you very much Felix (thanks all for answer). I don't
have knowlege in MySql. Thanks thanks thanks. I have one more select (the
last), if you can help me with this please.

SELECT * FROM login_users WHERE id IN (SELECT o.user_id from orders
o,facturas f where factura_id='".$order."' AND o.orders_id=f.pedido);

Thanks all,
Tomás
-----Mensaje original-----
De: Felix Geerinckx [mailto:felix.geerinckx@stripped] 
Enviado el: jueves, 11 de enero de 2007 19:25
Para: mysql@stripped
Asunto: Re: Need any that can translate this

informatica@stripped (Tomás Abad Fernández) wrote in
news:mysql.general-204367@ style="color:#666">stripped: 

> I dont know why thease don't work at MySql 3.21 , anyone can help me 
> to make this compatible with mysql3?

3.21 is really ancient ...
>  
> $query = "SELECT * FROM facturas WHERE pedido IN (SELECT orders_id 
> FROM orders WHERE user_id='".$user."') ORDER BY factura_id";

... don't even know if this will work:

SELECT DISTINCT
    f.*
FROM facturas f, orders o
WHERE 
    f.pedido = o.orders_id AND
    o.user_id = '$user'
ORDER BY f.factura_id;

--
felix

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/mysql?unsub=1

Thread
Need any that can translate thisTomás Abad Fernández11 Jan
  • Re: Need any that can translate thisFelix Geerinckx11 Jan
    • RE: Need any that can translate thisTomás Abad Fernández12 Jan
Re: Need any that can translate thisPeter Bradley11 Jan
  • Re: Need any that can translate thisRan11 Jan
    • Re: Need any that can translate thisDušan Pavlica12 Jan