|
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
>
>
>
Navigation:
[Reply to this message]
|