Hi everyone,
I have a form where you fill out "description" from a textarea and on
submit, it updates description in mytable.
This works fine. I want to also add the current date into description in my
table.
Here's what I get:
$date = date ("F d Y");
$sql = "UPDATE mytable SET description=
Fortunately I have solved this problem. I think it was something about
being a two field composed foreign key and updating these two fields at
the same time gave some kind of error.
I solve it by adding a temporary row in the referenced table with one of
the fields already changed and then updatin
Posting you table difinitions and queries would be helpful.
Olexandr Melnyk,
http://omelnyk.net/
2007/2/8, Alicia Amadoz <[EMAIL PROTECTED]>:
Hello,
I am trying to update two fields of a table that are a composed foreign
key to another table. These fields cant
Hello,
I am trying to update two fields of a table that are a composed foreign
key to another table. These fields cant be updated with this kind of
warning:
Warning | 1292 | Truncated incorrect DOUBLE value: 'A05'
Both tables are InnoDB and I have tried with all types of constraints,
ON UPDATE
Hello.
Please, could you provide the CREATE statement for you tables
and describe the relationships between their fields (it will
be good if you include sample data as well).
Matthew Batt wrote:
> Hi
>
> I need to update the 'products_id' field (shown below) by copying data
> from
Hi
I need to update the 'products_id' field (shown below) by copying data from
a separate table but I can't use the 'UPDATE' query as each 'product_id'
entry relates to a specific 'products_model' row.
id / assembly_no / products_id / products_model
1 / 2313 / *** / CASEACERENTRY2
2 / 2313 /
, 2005 9:26 am
Subject: Re: problem with update statement
> Hi,
> this is an example where what you describe doesn't happen (v 4.1
> and 5.0) :
> mysql> create table ports(mac varchar(17),port_index varchar(3));
> Query OK, 0 rows affected (0.10 sec)
>
> mysql> in
Hi,
this is an example where what you describe doesn't happen (v 4.1 and 5.0) :
mysql> create table ports(mac varchar(17),port_index varchar(3));
Query OK, 0 rows affected (0.10 sec)
mysql> insert into ports values('00:04:FB:23:5A:44','120'),(NULL,'120');
Query OK, 2 rows affected (0.08 sec)
Recor
That is very odd behavior and shouldn't be happening. I ran a quick
test on my machine and MySQL does not exhibit that behavior. You may
try running and repair on your table. Perhaps something is out of
whack. What version of MySQL are you running?
On Apr 22, 2005, at 6:08 PM, [EMAIL PROTECTED]
Hello, all:
In a MyISAM table, I have a column named "MAC", of type VARCHAR(17).
This field is used to hold MAC addresses of computers' network
interface cards. These MAC addresses are in the
form "XX:XX:XX:XX:XX:XX", where X can be either a number or an
uppercase letter. I can run "select
Thank you, even if I checked a lot the syntax, couldn't see it (too obvious).
Sorry for the time...
--- Paul DuBois <[EMAIL PROTECTED]> wrote: > At 13:06 -0400 10/6/03, Franck Babin
wrote:
> >It's a syntax error. Even when I try without DATE_FORMAT:
> >
> >UDPATE activity SET activity_date = '20
At 13:06 -0400 10/6/03, Franck Babin wrote:
It's a syntax error. Even when I try without DATE_FORMAT:
UDPATE activity SET activity_date = '2003-10-06 11:00:00', type_no =
1 WHERE activity_date =
'2003-06-10 11:15:00' AND type_no = 1;
Ah.
Perhaps spelling UDPATE as UPDATE will fix the problem. :-
It's a syntax error. Even when I try without DATE_FORMAT:
UDPATE activity SET activity_date = '2003-10-06 11:00:00', type_no = 1 WHERE
activity_date =
'2003-06-10 11:15:00' AND type_no = 1;
--- Paul DuBois <[EMAIL PROTECTED]> wrote: > At 12:55 -0400 10/6/03, Franck Babin
wrote:
> >I have made
At 12:55 -0400 10/6/03, Franck Babin wrote:
I have made some changed but it still doesn't work:
UDPATE activity SET activity_date = '2003-10-06 11:00:00', type_no = 1 WHERE
DATE_FORMAT(activity_date,'%Y-%m-%d %H:%i:%s') = '2003-06-10
11:15:00' AND type_no = 1;
I want to update only rows where e
I have made some changed but it still doesn't work:
UDPATE activity SET activity_date = '2003-10-06 11:00:00', type_no = 1 WHERE
DATE_FORMAT(activity_date,'%Y-%m-%d %H:%i:%s') = '2003-06-10 11:15:00' AND type_no =
1;
I want to update only rows where equals '2003-06-10 11:15:00'
Is this formula
At 11:28 -0400 10/6/03, Franck Babin wrote:
I have this simple sql statement:
UDPATE activity
SET activity_date = '9.10.2003 10:00:00', type_no = 1
WHERE DATE_FORMAT(activity_date,'%d.%m.%Y %H:%i') = '09.10.2003 10:00'
AND type_no = 1;
I'm not able to execute the query. It seems that the
portion
your date format is not correct. It should be activity_date = '2003-9-10
10:00:00'.
-Original Message-
From: Franck Babin [mailto:[EMAIL PROTECTED]
Sent: Monday, October 06, 2003 8:28 AM
To: [EMAIL PROTECTED]
Subject: Dummy problem with UPDATE for DATETIME field
I have this
I have this simple sql statement:
UDPATE activity
SET activity_date = '9.10.2003 10:00:00', type_no = 1
WHERE DATE_FORMAT(activity_date,'%d.%m.%Y %H:%i') = '09.10.2003 10:00'
AND type_no = 1;
I'm not able to execute the query. It seems that the
portion is not valid. is a DATETIME field.
Any
I'm having some trouble updating a mysql database with a perl cgi.
Here's the perl:
$sql = "UPDATE grants SET agency2 = \"$agency2\" WHERE agency2 = \"$key\"";
$rv = do($sql)
or die "Can't execute $sql: $dbh->errstr\n";
Here's the error returned in the browser:
Can't execute UPDATE grants
On Friday 22 November 2002 17:19, RAHARD Matthieu wrote:
> I set up replication on my servers since the version 3.23.43. Recently I
> upgrade all my servers to version 4.0.3.
> The replication work fine for insert and delete queries (also alter table)
> but doesn't take care of update queries.
re
Hello,
I set up replication on my servers since the version 3.23.43. Recently I
upgrade all my servers to version 4.0.3.
The replication work fine for insert and delete queries (also alter table)
but doesn't take care of update queries.
When I make an update on an existant row in a table on the m
STIBS,
Thursday, October 17, 2002, 12:26:34 AM, you wrote:
S> I have a littlebig problem:
S> I want to UPDATE table1.fields with data from table2.fields WHERE the id (in this
S> case a product number) is the same in both tables.
S> OK, I did this:
S> UPDATE table1 SET table1.field1 = table2.fi
Thanx guys!
but:
I'm not in the mood to try Greg's suggestion ... LOL!
I think I'll work around that with Escapade programming language. It's much easier to
handle.
If not:
I run a script that checks record by record in the first table if an update in the
second table is available then I query
>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 16, 2002 5:15 PM
Subject: RE: Problem with UPDATE table ... can u help plz?
When I try that modified for my tables that fit this hypothetical, I get:
CREATE TABLE `sales_table` (
`item_s` varchar(100) default '',
`price_s
on the page shows a kluge
workaround.
Greg
-Original Message-
From: Bruce Lewis [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 16, 2002 4:03 PM
To: STIBS; [EMAIL PROTECTED]
Subject: Re: Problem with UPDATE table ... can u help plz?
You need an InnerJoin to perform the operation similar
IL PROTECTED]>
Sent: Wednesday, October 16, 2002 4:26 PM
Subject: Problem with UPDATE table ... can u help plz?
Hi from Dresden, Germany!
I have a littlebig problem:
I want to UPDATE table1.fields with data from table2.fields WHERE the id (in
this
case a product number) is the same in both t
Hi from Dresden, Germany!
I have a littlebig problem:
I want to UPDATE table1.fields with data from table2.fields WHERE the id (in this
case a product number) is the same in both tables.
OK, I did this:
UPDATE table1 SET table1.field1 = table2.field1, table1.field2 = table2.field2,...
WHERE ta
Andis,
Friday, September 06, 2002, 12:08:58 PM, you wrote:
AG> Is it's possible to execute such query in MySQL?
AG> update table_name set table1.field1=table2.field2 where
AG> table1.key=table2.key
If you use 4.0.2 or higher yes, otherwise nope.
Pre-version of multi-table updates came only in 4
Hi!
Is it's possible to execute such query in MySQL?
update table_name set table1.field1=table2.field2 where
table1.key=table2.key
Thanx
Andis
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual
Ooops!! This seems to be a bug in EMS MySQL Manager... Sorry to bother
you all...
Regards
Peter
-Original Message-
From: Paul DuBois [mailto:[EMAIL PROTECTED]]
Sent: do 24 jan 2002 18:51
To: Peter Bremer; Mysql (E-mail)
Subject: Re: Problem with UPDATE and User Variables
At
At 18:32 +0100 1/24/02, Peter Bremer wrote:
>Hi,
>
>Can anybody explain why the following does not work?
>
> SELECT @variable := value1;
> UPDATE table SET field1 = @variable WHERE field2 = value2;
>
>The result is always that field1 is set to NULL...
Works for me, if I substitute a real valu
Hi,
Can anybody explain why the following does not work?
SELECT @variable := value1;
UPDATE table SET field1 = @variable WHERE field2 = value2;
The result is always that field1 is set to NULL...
Regards,
Peter Bremer
Hi,
You'll need to post your query and the error message to get a meaningful
response.
Quentin
-Original Message-
From: Prachi Shroff [mailto:[EMAIL PROTECTED]]
Sent: Monday, 29 October 2001 1:36 p.m.
To: [EMAIL PROTECTED]
Subject: problem with update
Hi all!
I am new to MySQ
Hi all!
I am new to MySQl and am having trouble executing an UPDATE statement in a
perl script. The same UPDATE statement works fine when used on the prompt.
Also, the same perl script executes other statements like SELECT. I am
running mysql 3.23.42, perl 5.6.1 on a Windows2000 system. Has an
On 10-Aug-2001 Julian Simpson wrote:
> In what way is it mangling my query?
> and why won't the same query work from my php script.
> I would accept this if it was just any interface but myphpadmin is supposed
> to be in line with mysql standards.
>
>>> update cdrequest set albumfill = "hot sho
>> In what way is it mangling my query?
>> and why won't the same query work from my php script.
>> I would accept this if it was just any interface but myphpadmin is supposed to be
>in line with mysql standards.
>>
>> >> update cdrequest set albumfill = "hot shots II", releasedatefill
>> >> =
On Fri, Aug 10, 2001 at 02:19:21AM -0400, Julian Simpson wrote:
> In what way is it mangling my query?
> and why won't the same query work from my php script.
> I would accept this if it was just any interface but myphpadmin is supposed to be in
>line with mysql standards.
>
> >> update cdreque
In what way is it mangling my query?
and why won't the same query work from my php script.
I would accept this if it was just any interface but myphpadmin is supposed to be in
line with mysql standards.
>> update cdrequest set albumfill = "hot shots II", releasedatefill
>> = 20010708 where requ
> update cdrequest set albumfill = "hot shots II", releasedatefill
> = 20010708 where requstID = 2;
>
> i get:
> You have an error in your SQL syntax near '\"hot shots II\",
> releasedatefill = 20010708 where requstID = 2' at line 1
> I can't see any reason for the error.
Your web based inte
I have a table 'cdrequest' it has columns 'albumfill' and 'releasedatefill' among
others
when i do the following query with myphpadmin
update cdrequest set albumfill = "hot shots II", releasedatefill = 20010708 where
requstID = 2;
i get:
You have an error in your SQL syntax near '\"hot sh
>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 23, 2001 23:55
Subject: Problem with Update to 3.23.38
> HI,
>
> I got the following problem with apache_1.3.20 + modssl-2.8.4-1.3.20
+
> openssl-0.9.6a + php-4.0.5 + mysql-3.23.38. After I upgrade the system, I
> can
HI,
I got the following problem with apache_1.3.20 + modssl-2.8.4-1.3.20 +
openssl-0.9.6a + php-4.0.5 + mysql-3.23.38. After I upgrade the system, I
can only connect to mysql server via the consle window. But, I am not able
to use the php-mysql command to connect to the server via the web
That log rotation script smells like the culprit to me. Exactly what is
it doing?
If it is clipping the file in a way that doesn't let MySQL reset the
file pointer
when you do the flush logs command, you could be max-ing the file out
to its ulimit.
Cheers,
Kent
I am running MySQL 3.22.32 on a sun enterprise server, but I am having
problems with update logging. When update logging is specified in the
/etc/my.cnf file and the MySQl process restarted logging will commence
but will stop after a few hours (the number of hours is variable!).
Connecting to the
Oliver Hinds wrote:
>
> On Thu, 18 Jan 2001, Gerald L. Clark wrote:
>
> > Oliver Hinds wrote:
> > >
> > > Has anyone experienced problems using DBI and perl with update statements
> > > not updating tables when the equivalent statement at the command line
> > > works, and all other operations wo
On Thu, 18 Jan 2001, Gerald L. Clark wrote:
> Oliver Hinds wrote:
> >
> > Has anyone experienced problems using DBI and perl with update statements
> > not updating tables when the equivalent statement at the command line
> > works, and all other operations work perfectly?
> >
> > Oliver Hind
Oliver Hinds wrote:
>
> Has anyone experienced problems using DBI and perl with update statements
> not updating tables when the equivalent statement at the command line
> works, and all other operations work perfectly?
>
> Oliver Hinds
>
>
Only when I make the wrong assumption about what perl
Has anyone experienced problems using DBI and perl with update statements
not updating tables when the equivalent statement at the command line
works, and all other operations work perfectly?
Oliver Hinds
-
Before posting, ple
48 matches
Mail list logo