Re: PHP inside php
- From: Stefan Rybacki <stefan.rybacki@xxxxxxx>
- Date: Mon, 25 Jul 2005 12:05:03 +0200
Mikro wrote:
Hi!
I need to select php files stored on mysql like this:
p2ring3 =mysql_query("SELECT * FROM info where id_link='$id'"); while($rida= mysql_fetch_array($p2ring3)) echo " <table border=1 width=100%> <tr> <td> ".$rida["info"]." </td> </tr> </table>
But the result is ".$rida["maakond"]."
".$rida["nimi"].", ".$rida["ettevote"]."
".$rida["aadress"].", ".$rida["telefon"]."
".$rida["email"]." ".$rida["web"]."
"; } ?>
Do you mean, $rida["info"]=".$rida["..."? I guess you should really think about your design! Why don't you write your query like this:
SELECT *,CONCAT(maakond,' ',nimi,', ',ettevote,' ',...) as info FROM info where id_link='$id'
If not there is a function called create_function.
Regards Stefan
most be: Estonia
Peeter , Ettevõte
Street 3, Linn, 5555555
sample@xxxxxxxxx
.
- References:
- PHP inside php
- From: Mikro
- PHP inside php
- Prev by Date: PHP inside php
- Next by Date: Work with UML and PHP
- Previous by thread: PHP inside php
- Next by thread: Work with UML and PHP
- Index(es):
Relevant Pages
|