On Tue, Mar 8, 2011 at 11:16 AM, Ron Piggott
wrote:
>
> I am wondering if there is a way to do an UPDATE query where only some of the
> text changes.
>
> The column I need to modify is named “toll_free”
> What I need to search for is: 800-
> I need it to replace it with is 1-800-
> - BUT I don’t
On 14 March 2011 15:42, Gary wrote:
> I have a table in a mysql db that has 3 columns that I want to insert
> (update) data if the row&column is empty (IS NULL). However I want to start
> at the first column, if this column is not null, then move to insert the
> data into column 2, if that is emp
Koert
Sent: Tuesday, March 08, 2011 11:20 AM
To: Ron Piggott
Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] UPDATE query
On Tue, Mar 8, 2011 at 11:16 AM, Ron Piggott
wrote:
I am wondering if there is a way to do an UPDATE query where only some of
the text changes.
The column I need to modify
I was wondering this Bastien. Ron
The Verse of the Day
“Encouragement from God’s Word”
http://www.TheVerseOfTheDay.info
-Original Message-
From: Bastien Koert
Sent: Tuesday, March 08, 2011 11:20 AM
To: Ron Piggott
Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] UPDATE query
On Tue
On Tue, Mar 8, 2011 at 11:16 AM, Ron Piggott
wrote:
>
> I am wondering if there is a way to do an UPDATE query where only some of the
> text changes.
>
> The column I need to modify is named “toll_free”
> What I need to search for is: 800-
> I need it to replace it with is 1-800-
> - BUT I don’t
[ please always send to the mailing list ]
Emiliano Boragina wrote:
Hi Chris, thanks for your ask...
This doubt was beacause I have two tables... one with categories (category
id and category name), and the other with products (product id, product
name, category id which the prod belong). The cl
Emiliano Boragina wrote:
Hello everyone…
I dont know how to update a lot of registers on one table.
I have two tables: Students and Signatures
STUDENTS has got: id / name / signature
SIGNATURES has got: id / name / classroom
I want to use words and not numbers to write the si
http://dev.mysql.com/doc/refman/5.0/en/replace.html
Or as previously mentined:
http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html
> > -Original Message-
> > From: Ron Piggott [mailto:ron@actsministries.org]
> > Sent: Saturday, September 05, 2009 1:19 PM
> > To: php-
Thanks
- Original Message -
From: "Waynn Lue"
To: "Ron Piggott" ;
Sent: Saturday, September 05, 2009 4:45 PM
Subject: Re: [PHP-DB] UPDATE instead of INSERT INTO
INSERT INTO ON DUPLICATE KEY UPDATE is what you're looking for.
On 9/5/09, Ron Piggott wro
INSERT INTO ON DUPLICATE KEY UPDATE is what you're looking for.
On 9/5/09, Ron Piggott wrote:
> I made an application which lets users rate web site content. At the heart
> of the application is this mySQL query:
>
> INSERT INTO `ratings` ( `reference` , `content_type` , `content_reference` ,
> `
-you-wanna-call-them are used to be
explicit with a name.
-TG
- Original Message -
From: "Gary Wardell" <[EMAIL PROTECTED]>
To:
Date: Thu, 13 Dec 2007 19:33:57 -0500
Subject: RE: [PHP-DB] UPDATE syntax
> Hi,
>
> I'm a beginner at PHP and MySql but a long
Hi,
I'm a beginner at PHP and MySql but a long time MS SQL server user.
Maybe it should be `advertisements`.`displayed` instead?
I just did a test and my Query browser doesn't like `interestcodes.id` but
likes `interestcodes`.`id`. Notice the quotes
(accents) on each side to the period.
Gary
Ron Piggott wrote:
Is it possible to do an UPDATE with an INNER JOIN --- I want the WHERE
to use 2 tables in selecting which rows are going to be updated in
table1.
http://dev.mysql.com/doc/refman/5.0/en/update.html
You can also perform UPDATE operations covering multiple tables.
However, you
'show table status' will return a record set that you can parse to get the
last update time
bastien
From: Pete Holsberg <[EMAIL PROTECTED]>
To: php-db@lists.php.net
Subject: RE: [PHP-DB] Update time/date stamp
Date: Wed, 2 Feb 2005 15:00:34 -0500 (EST)
On Wed, 2 Feb 2005, Bas
g with format, number of rows, row length and row size.
So the last-updated information is in A table but not the
table called directory.
Sorry for the confusion.
>
> >From: Pete Holsberg <[EMAIL PROTECTED]>
> >To: php-db@lists.php.net
> >Subject: RE: [PHP-DB] Update t
so select max(last_updated)
bastien
From: Pete Holsberg <[EMAIL PROTECTED]>
To: php-db@lists.php.net
Subject: RE: [PHP-DB] Update time/date stamp
Date: Wed, 2 Feb 2005 14:06:35 -0500 (EST)
On Wed, 2 Feb 2005, Bastien Koert wrote:
> is there a timestamp or data time field in the table? If
On Wed, 2 Feb 2005, Bastien Koert wrote:
> is there a timestamp or data time field in the table? If
> so just quuery that field for the max value
>
> select max(dateTimeFieldName) from TableName
No there isn't.
When I view the table with phpMyAdmin, it displays a table
that includes time/date s
is there a timestamp or data time field in the table? If so just quuery that
field for the max value
select max(dateTimeFieldName) from TableName
bastien
From: Pete Holsberg <[EMAIL PROTECTED]>
To: Bastien Koert <[EMAIL PROTECTED]>
CC: php-db@lists.php.net
Subject: RE: [PHP-DB] Upda
On Wed, 2 Feb 2005, Bastien Koert wrote:
> any particular table? or just the db in general?
It has just one table.
---
Pete Holsberg
Columbus, NJ
---
"When the people are afraid of the government, that's
tyranny. But when the government is afraid of the people,
that's liberty." -- Thomas Jeffer
any particular table? or just the db in general?
bastien
From: Pete Holsberg <[EMAIL PROTECTED]>
To: php-db@lists.php.net
Subject: [PHP-DB] Update time/date stamp
Date: Wed, 2 Feb 2005 10:56:08 -0500 (EST)
I would like to print the date and time my database was
last updated but don't know the query
Stumbling across some posts online, I noticed [some of] my messages were
being sent as evil ugly HTML - so I'm going to do my best to post from
Thunderbird for the list. Gotta keep OE configured as is for all the
lovely meeting scheduling.
Stuart Felenstein wrote:
--- Jochem Maas <[EMAIL PROTE
--- Jochem Maas <[EMAIL PROTECTED]> wrote:
> > if (count($inds) > 0 AND is_array($inds)) {
> > $ind = "'".implode("','", $inds)."'";
> > }
>
> looks like you want to do a select statement with
> $ind in the form of
> "SELECT * FROM yourtable WHERE yourfield IN ($inds)"
>
Adding the IN cla
Stuart Felenstein wrote:
--- Jochem Maas <[EMAIL PROTECTED]> wrote:
don't be sorry, be pro-active and rewrite it until
its idiot proof. its
in your own best interest - the clearer you state
your problem the
greater the chance someone will/can help you.
I don't know about anyone else, but I hav
Norland, Martin wrote:
-Original Message-
From: Jochem Maas [mailto:[EMAIL PROTECTED]
Sent: Monday, January 10, 2005 11:59 AM
Subject: Re: [PHP-DB] Update multiple records
...
That's what I get for troubleshooting before lunch!
My apologies to the list and to anyone unfortunate enou
--- Jochem Maas <[EMAIL PROTECTED]> wrote:
> don't be sorry, be pro-active and rewrite it until
> its idiot proof. its
> in your own best interest - the clearer you state
> your problem the
> greater the chance someone will/can help you.
>
Well I've started with a clean slate. Meaning I
ditc
Stuart Felenstein wrote:
Having a problem here with updating multiple records
in a table.
as Martin Norland (a heavy hitter on this list AFAIKT) already stated
you don't seem to be at the stage of actually doing an update, no big
deal - only you are doing yourself an injustice by given a misle
> -Original Message-
> From: Jochem Maas [mailto:[EMAIL PROTECTED]
> Sent: Monday, January 10, 2005 11:59 AM
> Subject: Re: [PHP-DB] Update multiple records
[snip]
> > This line in particular clearly warrants attention. Cookie to
whoever
> > guesses what&
Norland, Martin wrote:
-Original Message-
From: Stuart Felenstein [mailto:[EMAIL PROTECTED]
Sent: Monday, January 10, 2005 10:40 AM
Subject: [PHP-DB] Update multiple records
Having a problem here with updating multiple records in a table.
[snip]
Lets see - where to begin...
SELECT * F
> -Original Message-
> From: Stuart Felenstein [mailto:[EMAIL PROTECTED]
> Sent: Monday, January 10, 2005 10:40 AM
> Subject: [PHP-DB] Update multiple records
>
> Having a problem here with updating multiple records in a table.
[snip]
Lets see - where to begin...
> SELECT * FROM `Pro
--- Andrew Kreps <[EMAIL PROTECTED]> wrote:
> On Thu, 6 Jan 2005 07:28:32 -0800 (PST), Stuart
> Felenstein
> <[EMAIL PROTECTED]> wrote:
> >
> > The problem I'm having a hard time getting my
> hands
> > around are those areas where they can have
> multiple
> > entries.
> >
> > One of the tables
On Thu, 6 Jan 2005 07:28:32 -0800 (PST), Stuart Felenstein
<[EMAIL PROTECTED]> wrote:
>
> The problem I'm having a hard time getting my hands
> around are those areas where they can have multiple
> entries.
>
> One of the tables allows for a user to enter up to 5
> choices. The table would look l
From: "Khalid Judeh" <[EMAIL PROTECTED]>
I have a script that make changes to the database in more than
one sql statement, as i need to update more than one table at
the same time, I want to know if there is a method where all
of those changes are committed, or rolled back if some error
occured(let
On Wed, 25 Aug 2004 22:08:03 -0700 (PDT), Khalid Judeh
<[EMAIL PROTECTED]> wrote:
> Hello,
> I have a script that make changes to the database in more than one sql statement, as
> i need to update more than one table at the same time, I want to know if there is a
> method where all of those chang
sold"];
print "";
print $row["income_in"];
print "";
print $row["income_out"];
print "\n";
}
print "\n";
?>
Please enter closing details;
Closed Date:
Option Close
Justin,
Is the code you posted all of the code or just a small snippet? You
don't appear to be setting $C or $G. Could you post a larger code dump
please?
-Sam
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
: Thursday, 24 June 2004 2:55 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Update data problem
$E= "$C*$G";
Should be:
$E = $C * $G;
Never use quotation marks when doing math. Quotation marks are used
for strings. Hope that helps.
--
PHP Database Mailing List (http://www.php.net/)
To u
$E= "$C*$G";
Should be:
$E = $C * $G;
Never use quotation marks when doing math. Quotation marks are used
for strings. Hope that helps.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
hwee
- Original Message -
From: "Ricardo Lopes" <[EMAIL PROTECTED]>
To: "Ng Hwee Hwee" <[EMAIL PROTECTED]>
Cc: "PHP DB" <[EMAIL PROTECTED]>
Sent: Wednesday, February 18, 2004 5:41 PM
Subject: Re: [PHP-DB] Update Statement
> you could
you could use:
for ($i=0; $i< max; $i++)
{
mysql_query("update Table1, Table2 set Table1.field1 = Table2.field2
where Table1.no = Table2.no");
}
OR if you use mysqlt daemon (support for transactions, in this case is best)
mysql_query('BEGIN');
for ($i=0; $i< max; $i++)
{
if (! mysql_quer
x27;FWO', Grp='IIM'
WHERE ZNum='112763'";
- Paul
-Original Message-
From: Peter Lovatt [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 20, 2004 5:17 PM
To: Kermit Short; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Update problems
you need quote
you need quotes around the name
FirstName="$fname"
otherwise it takes the value of $fname to be aa field name
HTH
Peter
-Original Message-
From: Kermit Short [mailto:[EMAIL PROTECTED]
Sent: 20 January 2004 22:28
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Update problems
I'm trying to
be a push in the right direction (I
hope).
Hope this helps.
Rich
> -Original Message-
> From: Aaron Bryer [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 29, 2003 3:18 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP-DB] Update Query
>
>
> I did that below is th
al Message-
From: Hutchins, Richard [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 29, 2003 3:07 PM
To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Update Query
How do you know it failed? What is the mysql_error() returning to you?
I'd also recommend you
How do you know it failed? What is the mysql_error() returning to you?
I'd also recommend you echo out the query to the browser window before
sending it so you can see exactly what's being sent to the database. That'll
help you troubleshoot SQL problems on your own.
> -Original Message-
>
Thanks to all. Single quotes around '$value' did the trick.
Robbie
CPT John W. Holmes wrote:
From: "Robbie Staufer" <[EMAIL PROTECTED]>
I'm writing an application that will display the contents of a db in the
browser, including the db-assigned id number. The user can then enter
the id numb
Quotes missing around $value. Try instead:
mysql_query( "UPDATE tablename SET {$name} LIKE '{$value}' WHERE ID={$id}")
Of course, even though the code does not show, you have properly validated
user input before firing this query...
HTH
Ignatius
_
- Original Message -
From: "Robbie Staufer" <[EMAIL PROTECTED]>
> I'm writing an application that will display the contents of a db in the
> browser, including the db-assigned id number. The user can then enter
> the id number in a form and the browser will display the record
> corresponding to that id number, with t
put some single quotes around $value in your SQL statement.
-Original Message-
From: Robbie Staufer [mailto:[EMAIL PROTECTED]
Sent: 24 September 2003 16:21
To: [EMAIL PROTECTED]
Subject: [PHP-DB] update db with variables
Hi,
I'm writing an application that will display the contents of a
As a separate issue, I would consider seperating the address field into
it's individual parts
Street,area,city etc.. All different fields
-Original Message-
From: Shaun [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 23, 2003 2:03 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] UPDATE
on 23/9/03 1:03 pm, Shaun at [EMAIL PROTECTED] wrote:
> 1. How can I clean the table, so for example changing:
> Ashfield Business Centre The Idlewells Precinct
> Sutton-in-Ashfield
> to:
> Ashfield Business Centre, The Idlewells Precinct, Sutton-in-Ashfield,
>
> 2, Is there a way to make s
ED]>
Sent: Monday, July 14, 2003 2:32 PM
Subject: Re: Re: [PHP-DB] UPDATE query
>
>
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> $query1 = "UPDATE news,autori SET
> news.titolo='$titolo', news.testo='$testo',
> news.data='$data', news.nome='$nome',
> autori.mail='$mail' WHERE news.nome =
> autori.nome AND id='$id'";
You can't do an update across tables the last time I checked. Even if it's
possible in newer versions, usin
Daniela,
Why do you want to keep a calculated field inside your database?
--
Beverly Steiner
[EMAIL PROTECTED]
-Original Message-
From: Dani Matielo [mailto:[EMAIL PROTECTED]
Sent: Monday, March 03, 2003 10:18 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Update MD5 fie
On Saturday 01 March 2003 14:27, Alawi shekh albaity wrote:
> What wrong with this SQL
> $SQLSTATEMENT["UPDATE_CAT"] = "
> UPDATE cats SET
> cat_name = '$cat_name',
Remove that trailing comma.
> WHERE cat_id = $catidforedit
> ";
> Error no : 1064
> Details :
>
> You have an error in your
Shouldn't have a comma after cat_name = '$cat_name' unless you are updating
multiple fields.
Gary Every
Sr. UNIX Administrator
Ingram Entertainment
(615) 287-4876
"Pay It Forward"
mailto:[EMAIL PROTECTED]
http://accessingram.com
-Original Message-
From: Alawi shekh albaity [mailto:[EMA
Remove the comma at the end of this line:
> cat_name = '$cat_name',//remove this comma
> -Original Message-
> From: Alawi shekh albaity [mailto:[EMAIL PROTECTED]
> Sent: Saturday, March 01, 2003 1:27 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Update errors
>
>
> What wrong with this
, February 05, 2003 1:44 PM
Subject: Re: [PHP-DB] UPDATE doesn't work
> On Wednesday 05 February 2003 12:50, Le Hoang wrote:
>
> >
> > // Add 1 view to the view column
> >
> > $v = $row[view];
> > $vplus = $v+1;
> > $view = mysq
On Wednesday 05 February 2003 12:50, Le Hoang wrote:
>
> // Add 1 view to the view column
>
> $v = $row[view];
> $vplus = $v+1;
> $view = mysql_query("update photoshop_tutorial where id=$id set
> view=$vplus"); // Problem here!
You should ALWAYS check the result of a call to mysql_query():
if
;[EMAIL PROTECTED]>
>To: "Ike Austin" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
>Sent: Tuesday, February 04, 2003 2:17 PM
>Subject: Re: [PHP-DB] update
>
>
>> UPDATE is for changing values in existing rows. It appears you want to
>> add new inf
To: "Ike Austin" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, February 04, 2003 2:17 PM
Subject: Re: [PHP-DB] update
> UPDATE is for changing values in existing rows. It appears you want to
> add new information. Use INSERT.
>
> $query= "
UPDATE is for changing values in existing rows. It appears you want to
add new information. Use INSERT.
$query= "INSERT tablename SET (username, email, location) VALUES(
$username, $email, $location)";
Note that a WHERE condition is incorrect for INSERT.
Your UPDATE syntax is not correct either
On Friday 31 January 2003 15:31, nikos wrote:
> I've download some patches for PHP 4.0.6. and I dont know how to use it.
> For example rfc1867.c.diff-4.0.6 file how can I "run" it and do the update?
> I have PH 7,2 Linux and Apache 1,32
> Thank you
If there's no compelling reason for you to be st
On Sunday 15 December 2002 09:24, Hartleigh Burton wrote:
> Hi,
>
> I am having a small problem when it comes to updating some tables that I
> have. tblmembers and tbloptions are both linked together with the exact
> same userid #. here is the code i have been using...
>
> mys
> -Original Message-
> From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]]
> Sent: 10 December 2002 20:02
>
> I have definitely isolated the problem. If I change
> the column name
> that the match is being performed on from 'id-sys' to
> 'id_sys' I can execute
> the query witho
> I have definitely isolated the problem. If I change the column name
> that the match is being performed on from 'id-sys' to 'id_sys' I can
execute
> the query without having to worry about quoting the column name and
> everything works. I think that I am just going to leave the column name
> ch
, SCOTT V (SBCSI); '1LT John W. Holmes'; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Update Query Help...
SCOTT,
The list's crystal ball filter is down for maintenance.
Show us the tbl schema and the debug print of $update.
Then we won't be firing blind!
=dn
> I understand th
> To: NIPP, SCOTT V (SBCSI); [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] Update Query Help...
>
>
> > $tmp = $_POST['sbcuid']."-".$_POST['system'][$a];
> > $update = "UPDATE accounts SET atime='NOW()' WHERE
> > \"id-sys\&q
From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 1:45 PM
To: NIPP, SCOTT V (SBCSI); [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Update Query Help...
> $tmp = $_POST['sbcuid']."-".$_POST['system'][$a];
> $update = "UPDATE ac
SCOTT,
> I am attempting to UPDATE a table and I have having absolutely ZERO
> success. Here is the query:
> $tmp = $_POST['sbcuid']."-".$_POST['system'][$a];
> $update = "UPDATE accounts SET atime='NOW()' WHERE
> \"id-sys\"='".$tmp."'";
> echo $update;
> $result1 = mysql_query($update, $Prod) or
is it a mysql field type of datetime?
if so, you may want to use this instead
$timestamp=date("Y-m-j H:i:s");
$update = "UPDATE accounts SET atime='$timestamp' WHERE id-sys='$tmp'";
that puts the current timestamp in mysql format for entry into your table.
Cheers
Jason
-Original Message
> $tmp = $_POST['sbcuid']."-".$_POST['system'][$a];
> $update = "UPDATE accounts SET atime='NOW()' WHERE
> \"id-sys\"='".$tmp."'";
> echo $update;
> $result1 = mysql_query($update, $Prod) or die(mysql_error());
> echo mysql_affected_rows();
Try:
$update = "UPDATE accounts SET atime=NOW() WHERE id
> Quick questionis it possible to do an update query w/ a join yet?
If
> not, what is your preferred method? Would you take care of it on the
PHP
> side?
Probably depends on your database, but MySQL doesn't support it. I think
MySQL 4.0 might.
> I need to update a table w/ data from another
Cory Hicks [mailto:[EMAIL PROTECTED]] wrote:
> Hello to all!
>
> Quick questionis it possible to do an update query w/ a
> join yet? If not, what is your preferred method? Would you
> take care of it on the PHP side?
No, it's not possible, at least not with MySQL 3.x. MySQL 4.1, currently i
On Saturday 27 April 2002 01:34, Natividad Castro wrote:
> Hi to all,
> I have a form where users can insert or update a record. Now the way I have
> it, can just only do one thing either update or insert a new record. What I
> would like to do is: if it is a new record, execute the insert stateme
You could try inserting it, and see if it succeeds. If its fails, then you
know you have to update it.
IE
$sql= 'insert...'
$result = mysql_query($sql);
if(!$result)
{
$sql = 'update...';
mysql_query($sql);
}
-Chris
At 01:34 PM 4/26/2002 -0400, you wrote:
>Hi to all,
>I have a form where use
Use single quotes around the string!
Chris Payne wrote:
> Looking at the below, I think it might be spaces in the query - how can I
> rectify this? Thanks :-)
>
> Chris
>
> Hi there,
>
> I have a system for updating whereby you select the country/continent from a
> db then edit the record an
Looking at the below, I think it might be spaces in the query - how can I
rectify this? Thanks :-)
Chris
Hi there,
I have a system for updating whereby you select the country/continent from a
db then edit the record and update it and it works perfectly - that is until
there is a & in the updat
Jennifer,
I appreciate and I'm glad that you're learning. What you were proposing is
an easy trap to fall into. It's just that I've worked on systems where, for
no apparent reason, the designer had decided to store the number of
days/months someone had been a member / tenant / on-account custo
Why? Because I am learning. It seemed like the way to do it. I didn't know
all those things could happen. There is NO documentation, manual or tutorial
for that matter that gives clear, in English directions on how to do
something. People just assume that everyone knows techie talk. So they
explai
Why? There's absolutely no point -- record the date a person became a
member and calculate the number of days from that.
In addition, what happens when you fail to run the update routine? Or
someone runs it twice? Or it half runs, then dies because the database has
gotten so large that the sc
HP-DB] Update
i don't know why that 'VALUES' is there?
Lokesh
- Original Message -
From: "Gurhan Ozen" <[EMAIL PROTECTED]>
To: "Jennifer Downey" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, February 05, 2002 3:28 AM
Sub
Hi Jennifer,
> I am having problems with this code. I want to update a members number of
> days they have been a member can anyone help?
>
> $query["days"]=("UPDATE users set days_member VALUES = ('days_member' +
> '1'));
> $result=mysql_query($query["days"]);
=1 RTFM 6.4.5 UPDATE Syntax
=2 W
Try it without quotes around days_member and 1.
Gurhan
-Original Message-
From: Jennifer Downey [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 04, 2002 4:51 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Update
Hi,
I am having problems with this code. I want to update a members numbe
Hello,
I am not sure why you want to do this. Wouldn't it be better to use
calculate the days from the date signed up, rather than through updating
your database every day. Try using datediff.
Jeremy
At 01:51 PM 2/4/2002 -0800, Jennifer Downey wrote:
>Hi,
>
>I am having problems with this c
Hello Adv. Systems Design,
> I need to be able to update a field in MySQL, the catch is that I have to add on to
>text that is already there
and I have to be able to do it within MySQL (phpMyAdmin). My first idea was to do:
>
> SET prod_desc = prod_desc + "more info to tack on to end"
>
> but th
> SET prod_desc = prod_desc + "more info to tack on to end"
>
> but this is a mathematical function which returns 0!
update table set field = concat(field, "more info") where id = 1;
find the string functions in the mysql manual...
with kind regards,
Joffrey van Wageningen
--
PHP Database M
At 9:06 -0800 1/28/02, Adv. Systems Design wrote:
>hello all:
>
>I need to be able to update a field in MySQL, the catch is that I
>have to add on to text that is already there and I have to be able
>to do it within MySQL (phpMyAdmin). My first idea was to do:
>
>SET prod_desc = prod_desc + "mor
This is actually one of the more common MySQL problems which doesn't have an
easy answer.
The best I can offer is a bit of a kludge... but it does work. The trick is
to use the Replace...Select command. The problem with this is that you can
not select from the table you are replacing. But if y
alue as a new record on a unique index, the old record is deleted
before the new record is
inserted"
Niklas
-Original Message-
From: m0sh3 [mailto:[EMAIL PROTECTED]]
Sent: 2. marraskuuta 2001 13:37
To: Niklas Lampén
Subject: Re: [PHP-DB] UPDATE table1 FROM table2
thanx for
Yes, it is possible:
UPDATE TABLE2 SET (Field1, Field2, Field3)
SELECT UpdaterField1, UpdaterField2, UpdaterField3 FROM TABLE1
WHERE SomeField LIKE 'Something'
WHERE SomeField LIKE 'Something'
That should work. Manual tells you more in Update section.
Niklas
-Original Message
Hi,
The query code seems fine to me - did you try to otput $query to see if all
the variables you are using are OK. May be $order,$stationid or $orderNewsID
is misspeled or is not set properly.
HTH
Dobromir
-Original Message-
From: Jay Paulson <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <
are you saying the table is updated properly?
-Original Message-
From: Tommy Nilsson [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 26, 2001 12:04 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Update... more info
If i put the code into mysql directly it says it works nicely, so the
Cato,
Cato Larsen wrote:
> str_replace("'",""",$appearance)
don't forget that the correct html entity for ' is " so let that line be
str_replace("'",""",$appearance)
Markus Bertheau
Cenes Data GmbH
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
Hey Jason!
I got it working thanks to a print SQL command.
But could you give me an example on how to use htmlspecialchars() in my
case?
What would this line become? $appearance =
str_replace("'",""",$appearance)
Best regards Cato
http://www.oia.f2s.com
--
PHP Database Mailing List (http:
- Original Message -
From: Cato Larsen <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 16, 2001 4:54 PM
Subject: [PHP-DB] Update info from form to MySQL. No error but no Update
> Hi!
> I've set up a form that allows members to update they'r profile when they
> wish.
>
At 5:24 PM -0400 8/1/01, Steve Fitzgerald wrote:
>I belive this UPDATE should work, but it isn't. I get no errors. I have also
>tried using FieldName= '$Fieldname', but that does not seem to work either.
Try your WHERE clause with a SELECT statement and see if it's actually
matching any rows.
>
Isn't PHP/MySQL case sensitive? Are all the column names the correct
case?
You could also try changing your die bit to
or die (mysql_error());
that will echo the MySQL error message.
HTH!
Dave
-Original Message-
From: Steve Fitzgerald [mailto:[EMAIL PROTECTED]]
Sent: 01 August 2001
I think , You should do following :
update weld_details set parent = '1' where db_uid = '1' or db_uid = '2'
Ben Cairns wrote:
> I want to update a MySQL db table, but I want to update multiple records,
>
> Like this:
>
> I want to run a statement like this:
> update weld_details set parent = '
Hi Ben,
I think U can use: [...] where db_uid = '1' or db_uid = '2' ...
OR [...] where db_uid in ('1', '2', ...)
Hope this helps.
Greetinx,
Mike
Michael Rudel
- Web-Development, Systemadministration -
___
Suchtreffer AG
Bleicher
If I have the right-end of the stick then this is what you want:
$dropdown = "
--choose one--";
while($row = mysql_fetch_array($result)) {
$var = $row['yourcolumn'];
$dropdown .= "$var";
}//end while loop
$dropdown .= "";
Just replace the name of the column 'yourcolumn' and
1 - 100 of 102 matches
Mail list logo