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 S&R your own.
Hopefully this works as an att
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 PH
opps sorry for the typos
"you cant have"
You can have
'blah'.}
else {
.'blah'
because that is what you currently have.
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 sectio
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 o
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
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
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 am
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
--Ad
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.
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 "
At 14:00 01/03/2006, you wrote:
Message-ID: <[EMAIL PROTECTED]>
From: "Jeff Broomall" <[EMAIL PROTECTED]>
To:
Date: Wed, 1 Mar 2006 09:00:03 -0500
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="=_NextPart_000_0014_01C63D0E.87271600"
Subject: Where did my Hard Return
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
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
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/)
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
Put nl2br() around the field in the table that you saved newlines
nl2br($row['theTableFieldWithTheNewlines'])
maybe
' . nl2br($row['task_usaction']) . '
-Original Message-
From: Jeff Broomall [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 01, 2006 10:34 AM
To: Jeff Broomall
Cc: php-db@
You can't assign a value to a function! That's why attempt 1 didn't work.
Well, that and: The value returned by mysql_query is NOT a string, it's a
pointer to the values returned. You must fetch the string first to get the
column values out. This is why your third attempt was the only one that
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 backgroun
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 t
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.
22 matches
Mail list logo