Re: Datos de un query para hacer otro

From: Date: Sun, 26 Aug 2001 12:41:59 +0000
Subject: Re: Datos de un query para hacer otro
References: 1  Groups: php.general.es 
Request: Send a blank email to general-es+get-13247@lists.php.net to get a copy of this message
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 El Dom 26 Ago 2001 13:45, escribió: > Hola, soy muy niueva en esto y se me escapan un monton de cosas, asik yo > pregunto. > > Tengo un query k no da problemas, pero necesito su resultado para hacer > otro query y mostrarlo tambien. Ay que mal me explico! > Este es el codigo: > La primera consulta: > > $result=mysql_query( "select * from authors where name like '$letra%' limit > $offset,$limit"); > //De ella necesito hacer una segunda consulta: > > $query=mysql_query( "select tittle from books where id like > '.$data["id_book"].' "); Por que no lo haces todo en un consulta, por ejemplo: $result=mysql_query("select * from books,authors where books.id=authors.id_book and books.name like '$letra%' limit $offset,$limit"); Un saludo - -- Santi Juanico ronin@inicia.es -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjuI7pcACgkQ+GDzI5NA3LGYcQCfbLX2skQl9ztaPiMa4CgwTa9m T84Anj24IdQ99GhIxT/hy7Mst9ybdAUy =VyFM -----END PGP SIGNATURE-----

« previous php.general.es (#13247) next »