Reply to Re: PHP inside php

Your name:

Reply:


Posted by Stefan Rybacki on 07/25/05 13:05

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@sample.ee
>
>
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация