[PHP-DB] Where did my Hard Returns go?

2006-03-01 Thread Jeff Broomall
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.

[PHP-DB] Re: Where did my Hard Returns go?

2006-03-01 Thread Christoph Kunze
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

Re: [PHP-DB] Where did my Hard Returns go?

2006-03-01 Thread Jeff Broomall
As for an update... Through trial-and-error, I've determined the following don't work... Attempt 1: nl2br($result) = mysql_query ($query); // Run the query. Attempt 2: $result = mysql_query ($query); // Run the query. $result = nl2br($result) Attempt 3: $bg = '#ee'; // Set the

RE: [PHP-DB] Where did my Hard Returns go?

2006-03-01 Thread Dwight Altman
Put nl2br() around the field in the table that you saved newlines nl2br($row['theTableFieldWithTheNewlines']) maybe td align=left' . nl2br($row['task_usaction']) . '/td -Original Message- From: Jeff Broomall [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 01, 2006 10:34 AM To: Jeff

Re: [PHP-DB] Where did my Hard Returns go?

2006-03-01 Thread Philip Pryce
You can't assign a value to a function! that is actually incorrect, the list(); function assigns a value to a functions vars. -- ~Philip Pryce

Re: [PHP-DB] Where did my Hard Returns go?

2006-03-01 Thread Micah Stevens
list() is a language construct. On Wednesday 01 March 2006 9:18 am, Philip Pryce wrote: You can't assign a value to a function! that is actually incorrect, the list(); function assigns a value to a functions vars. -- ~Philip Pryce -- PHP Database Mailing List (http://www.php.net/) To

RE: [PHP-DB] Where did my Hard Returns go?

2006-03-01 Thread Dwight Altman
Like array(), this is not really a function, but a language construct. list() is used to assign a list of variables in one operation. http://php.he.net/manual/en/function.list.php Watch out for those language constructs which look to us like functions. Probably related to some folks preferring

[PHP-DB] Duplicate rows

2006-03-01 Thread Miguel Guirao
My dear beloved friends, I have a catalog of products that a product provider gave, sadly for me, in this CSV file there are many duplicated rows. I edited the file in my Linux system with the uniq -u command, and it worked somewhat fine, it eliminated some duplicated rows, originally the file

Re: [PHP-DB] Duplicate rows

2006-03-01 Thread Micah Stevens
SELECT DISTINCT * FROM `tablename` On Wednesday 01 March 2006 7:24 am, Miguel Guirao wrote: My dear beloved friends, I have a catalog of products that a product provider gave, sadly for me, in this CSV file there are many duplicated rows. I edited the file in my Linux system with the uniq

Re: [PHP-DB] Duplicate rows

2006-03-01 Thread tg-php
Depends on how you determine if something's a duplicate or not. For example, if it's just one column that can be used, you can do something like this: select ItemName, count(ItemName) from ItemListTable group by ItemName having count(ItemName) 1 That'll show you if ItemName is repeated.

Re: [PHP-DB] Duplicate rows

2006-03-01 Thread Ade Olonoh
Assuming you're using MySQL, instead of using INSERT INTO, you can use REPLACE INTO instead. If you have unique keys on that table, the new record will overwrite existing records with the same unique keys instead of creating a new one. http://dev.mysql.com/doc/refman/5.0/en/replace.html

Re: [PHP-DB] Duplicate rows

2006-03-01 Thread tg-php
Haha.. oh yeah.. DISTINCT works too.. in this case you'd get a list of all totally 100% unique records. If you had an auto_increment column though, you'd want to exclude it from the list. -TG = = = Original message = = = SELECT DISTINCT * FROM `tablename` On Wednesday 01 March 2006 7:24

Re: [PHP-DB] Duplicate rows

2006-03-01 Thread Micah Stevens
Ahh, good point, yes, keep in mind you may have some index rows.. On Wednesday 01 March 2006 10:18 am, [EMAIL PROTECTED] wrote: Haha.. oh yeah.. DISTINCT works too.. in this case you'd get a list of all totally 100% unique records. If you had an auto_increment column though, you'd want to

Re: [PHP-DB] Duplicate rows

2006-03-01 Thread Micah Stevens
err columns.. sorry.. On Wednesday 01 March 2006 10:45 am, Micah Stevens wrote: Ahh, good point, yes, keep in mind you may have some index rows.. On Wednesday 01 March 2006 10:18 am, [EMAIL PROTECTED] wrote: Haha.. oh yeah.. DISTINCT works too.. in this case you'd get a list of all

[PHP-DB] Mail Function

2006-03-01 Thread Mark Bomgardner
I have been racking my brain for the better part of a day with a simple mail function. I am trying to generate a list of events from MySQL and then use the php Mail function to email the list in an html email to a mailing list. I keep getting a parse error on a section that I can not figure

Re: [PHP-DB] Mail Function

2006-03-01 Thread JupiterHost.Net
Mark Bomgardner wrote: I have been racking my brain for the better part of a day with a simple mail function. I am trying to generate a list of events from MySQL and then use the php Mail function to email the list in an html email to a mailing list. I keep getting a parse error on a

Re: [PHP-DB] Mail Function

2006-03-01 Thread Philip Pryce
You can have 'blah'.} else { .'blah' because that is what you currently have.

Re: [PHP-DB] Mail Function

2006-03-01 Thread Philip Pryce
opps sorry for the typos you cant have

[PHP-DB] PHPSession problem - help needed

2006-03-01 Thread Chris Payne
Hi there everyone, I recently installed PHP 5 on my windows dev machine and it works great BUT I can't get sessions to work correctly and so my database logins won't work from my programming - which on a dev machine isn't good. Can anyone see something that is wrong in the sessions part of my

[PHP-DB] RE: [PHP] Nested Set Model or modified preorder tree traversal [SOLVED]

2006-03-01 Thread Daevid Vincent
Since I couldn't find any short and sweet drop in code for this, I made my own. Here it is in case anyone else finds it helpful. Should be pretty straight forward. I use my own mysql wrapper functions, but you can pretty much figure out what they do and SR your own. Hopefully this works as an