[PHP-DB] Re: Where did my Hard Returns go?
Jeff Broomall schrieb: Good morning. I created an edit_task page that allows the user to edit tasks for the database. I entered some text and used some hard returns. But when I went to view the tasks (using a PHP script if it matters), the hard returns didn't "take." None of em. All of the text is jumbled together. I checked within the MySQL database and noticed the Hard Returns show in the database (at least while using phpMyAdmin). Must have something to do with PHP? Where did I go wrong??? Thanks. --Jeff HTML doesn't care about "Hard Returns". I think you should transform them into . -> nl2br($text) Hope that helps, Chris -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: is this possible in one query?
Sjef Janssen schrieb: Hi there, I have a table that keeps names for different language codes. In a short example: nameId name languageCode 31 House EN 31 Wohnung DE 32 Piece En 32 Stuck De 33 Car EN 33 PKW DE What I would like is to have a query that returns for example: nameId = 31 Names = House - Wohnung Maybe I can even have a result that consists of an array with nameIds and Names. Or should I fire a bunch of queries after each other to have this result? I use mysql and php 4.3.8 Tnxs!! SELECT nameId, GROUP_CONCAT(name SEPARATOR ' - ') AS names FROM table GROUP BY nameId I think that will do it. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php