- Original Message -
From: Mike Blezien [EMAIL PROTECTED]
To: MySQL List mysql@lists.mysql.com
Sent: Monday, March 27, 2006 3:39 PM
Subject: Update multiple tables
Hello,
I'm alittle unclear on how too update multiple tables. We have two tables
with the same column name
Mike Blezien [EMAIL PROTECTED] wrote on 03/27/2006 03:39:15 PM:
Hello,
I'm alittle unclear on how too update multiple tables. We have two
tables with
the same column name:
account.state
account_service.state
when we update the account table, we also need to update
I am trying to update a table with a file that has more than one update
statements like this:
UPDATE products set products_price=22.00 WHERE products_model=5217-01
OR products_model=521701 AND products_um=CS;
UPDATE products set products_price=3 WHERE products_model=5217-01 OR
products_model
Hi,
I think your problem is that OR and AND do not
have the same precedence, AND binds tighter.
So what you need is probably:
(products_model=5217-01 OR products_model=5217-01) AND
products_um=CS and the same for PK and EA.
The way you have you'll get an update as soon as
products_model=5217-01
cybermalandro cybermalandro [EMAIL PROTECTED] wrote on
03/20/2006 11:00:51 AM:
I am trying to update a table with a file that has more than one update
statements like this:
UPDATE products set products_price=22.00 WHERE
products_model=5217-01
OR products_model=521701 AND products_um=CS
-01 OR products_model=5217-01) AND
products_um=CS and the same for PK and EA.
The way you have you'll get an update as soon as
products_model=5217-01
/Johan
cybermalandro cybermalandro wrote:
I am trying to update a table with a file that has more than one update
statements like
Ok now I am running this statement
UPDATE products INNER JOIN products_ums ON products.products_id =
products_ums.products_id SET products_ums.products_ums_price=552 WHERE (
products.products_model=2420-01 OR products.products_model=242001) AND
products_ums.products_ums_um=EA;
and I am getting
Hi folks.
I want to set the status of 5 records to 'completed'. how do I go about
that without having to prepare 5 different instructions?
update myTable set status = 'completed' where id=10 OR id=20 OR id=30
OR id=40 OR id=50
I'm trying to reduce the number of instructions.
Cheers
update myTable set status = 'completed' where id IN (10,20,30,40,50) LIMIT
5;
I believe that should work.
As a precaution, I recommend always using LIMIT x whenever possible on
SELECT, UPDATE or DELETE statements. This will minimize any accidental
dammage to other records should you have
- Original Message -
From: Rich [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Saturday, March 18, 2006 6:28 PM
Subject: Update Multiple Records
Hi folks.
I want to set the status of 5 records to 'completed'. how do I go about
that without having to prepare 5 different
update TABLE1 a, TABLE2 b set a.FIELD1=b.FIELD2
where column2='[EMAIL PROTECTED]'
And column1 = '[EMAIL PROTECTED]'
Or:
update TABLE1 a, TABLE2 b set a.FIELD1=b.FIELD2
where b.column2=a.column1
And column1 = '[EMAIL PROTECTED]'
Regards!
-Mensaje original-
De: Truong Tan Son [mailto
AAAUUUGGGHHH!!! You used the dreaded comma separated list !!! ;-)
A more explicit way to write the same thing posted by Sr. Cruz...
update TABLE1 a
INNER JOIN TABLE2 b
on a.id = b.other_id
set a.FIELD1=b.FIELD2
WHERE a.column1='literal';
Actually posting a real query (instead
Dear Sir,
All solutions is very good !
update TABLE1 a
INNER JOIN TABLE2 b
on a.id = b.other_id
set a.FIELD1=b.FIELD2
WHERE a.column1='literal';
Or
update TABLE1 a, TABLE2 b set a.FIELD1=b.FIELD2
where column2='[EMAIL PROTECTED]'
And column1 = '[EMAIL PROTECTED]'
Or
update TABLE1
Dear Sir,
MySQL-4.1.12 on RedHat Linux EL4:
mysql update TABLE1 set FIELD1=(select FIELD2 from TABLE2 where COLUMN2=
'[EMAIL PROTECTED]') where COLUMN1='[EMAIL PROTECTED]';
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp
onds to your MySQL server version
Hi
Iam not sure about the answer correct me if iam wrong :(
Dont use single quotes in count_of_logons ..
Try : $sql = UPDATE members
SET count_of_logons = count_of_logons + 1
WHERE logon_id = '$logonid'
AND logon_pw= '$logonpw
On Sun, 12 Mar 2006, Michael Stassen wrote:
To: [EMAIL PROTECTED]
From: Michael Stassen [EMAIL PROTECTED]
Subject: Re: Checking for good update
[EMAIL PROTECTED] wrote:
looks a bit strange to me.
$result = mysql_query($query) or die('Query couldn\'t
executed:'.mysql_error
of the query at the same time,
which AFAIK is not possible.
You should try it. It works just fine, and isn't the problem. The
problem is that you cannot treat the result of an UPDATE as if it were a
SELECT.
Regards
Keith Roberts
Yes, this is documented. It's also standard practice
Stassen wrote:
To: [EMAIL PROTECTED]
From: Michael Stassen [EMAIL PROTECTED]
Subject: Re: Checking for good update
[EMAIL PROTECTED] wrote:
On Sun, 12 Mar 2006, Michael Stassen wrote:
[EMAIL PROTECTED] wrote:
looks a bit strange to me.
$result = mysql_query($query
I try to update multiple rows in a federated table with one query, where field
a=x and field b=x..
There are 4 rows that match these criteria (selecting returns 4 rows) but
trying to update using the following query updates only one record.
calling the same query 4 times, updates only one record
Thank you Michael. I learned a lot from your detailed explanation
of how the update and select functions work in relation to
checking for good execution.
I used
if (mysql_affected_rows() == 1)
and got the results I was after.
I am stilling having problem with users browser
caching the screen
Trying to bump the count_of_logons by 1 using this update.
Phpmyadmin shows the count staying at zero.
I think that this SET count_of_logons = 'count_of_logons + 1'
is not coded correctly, but I get no errors so can not tell.
Anybody have any ideas?
The table def has count_of_logons INT
fbsd_user wrote:
Trying to bump the count_of_logons by 1 using this update.
Phpmyadmin shows the count staying at zero.
I think that this SET count_of_logons = 'count_of_logons + 1'
is not coded correctly, but I get no errors so can not tell.
Anybody have any ideas?
The table def has
Using this code I get this error message.
Warning: mysql_num_rows(): supplied argument is not a valid MySQL
result resource in /usr/local/www/data/mls_verifyemail.php on line
49
What code should I use to check if the update worked or not?
$query = UPDATE members SET email_verified='X' WHERE
Perhaps reading the manual would be a good start at
http://us3.php.net/manual/en/function.mysql-num-rows.php
It clearly states
Retrieves the number of rows from a result set. This command is only
valid for SELECT statements. To retrieve the number of rows affected by
a INSERT, UPDATE, or DELETE
All ready read that and its clear as mud.
It tells you update is different but gives no example.
I asked in my post what should I code for checking the result of a
update.
-Original Message-
From: Logan, David (SST - Adelaide) [mailto:[EMAIL PROTECTED]
Sent: Sunday, March 12, 2006 4
looks a bit strange to me.
$result = mysql_query($query) or die('Query couldn\'t
executed:'.mysql_error());
please try something like this:
// build the query - (that's OK)
$query = UPDATE members SET email_verified='X' WHERE
logon_id=' .$logonid. ';
// send the query to the server - save
Maybe I need to read the copy of php pocket reference I have
to David - LOL.
Keith
On Sun, 12 Mar 2006 [EMAIL PROTECTED] wrote:
To: mysql@lists.mysql.com
From: [EMAIL PROTECTED]
Subject: Re: Checking for good update
looks a bit strange to me.
$result = mysql_query($query) or die
Maybe I have the overall logic wrong.
I don't do a select query first to see if that record is there.
I just try to update it.
If the logonid key in the update request is on the table, the record
does get updated. I can verify that using phpmyadmin.
When the logonid key in the update request
fbsd_user wrote:
Using this code I get this error message.
Warning: mysql_num_rows(): supplied argument is not a valid MySQL
result resource in /usr/local/www/data/mls_verifyemail.php on line 49
What code should I use to check if the update worked or not?
Your second line does just
[EMAIL PROTECTED] wrote:
looks a bit strange to me.
$result = mysql_query($query) or die('Query couldn\'t
executed:'.mysql_error());
please try something like this:
Why? There's nothing wrong with the above statement.
// build the query - (that's OK)
$query = UPDATE members SET
Thanks Peter,
I didn't know that MySQL has no UPDATE ... SELECT command.
I followed your advice and made the following query
UPDATE Data AS db INNER JOIN
(SELECT myKey,Year,
SUM(IF(Month= 1,Cell,Null)) AS `Jan`,
...
SUM(IF(Month=12,Cell,Null)) AS `Dec`
FROM Updates GROUP BY myKey, Year
Updates
to 1 Data record where MyKey and Year are equal.
I tried the following query:
UPDATE Data AS db INNER JOIN Updates AS U
ON db.myKey = U.myKey
SET db.Jan = IF(U.Month = 1, U.Value, db.Jan),
db.Feb = IF(U.Month = 2, U.Value, db.Feb),
...
db.Dec = IF(U.Month=12, U.Value,db.Dec
,
but no UPDATE ... SELECT command, so this will be a two-step. If I
understand your
description correctly, you want to aggregate by month and report by
mykey and year, so
your crosstab would look something like this (not tested)...
CREATE TEMPORARY TABLE crosstab
SELECT
d.myKey,
d.year,
SUM
Hi
i ahve one table table_1 and columns like col_1,col_2,col_3
col_1 col_2 col_3
1 aa aaa
2 bb
Now i want to update my table table_1 SET col_3 as bbb where max of col_1
I wrote this below Query but it shows error how to write
UPDATE table_1
SET col_3 = 'bbb
On Monday 20 February 2006 03:27, Veerabhadrarao Narra wrote:
Hi
i ahve one table table_1 and columns like col_1,col_2,col_3
col_1 col_2 col_3
1 aa aaa
2 bb
Now i want to update my table table_1 SET col_3 as bbb where max of col_1
I wrote this below
I wrote this below Query but it shows error how to write
UPDATE table_1
SET col_3 = 'bbb'
WHERE col_1 = (SELECT max(col_1) FROM table_1)
See the docs for Update at
http://dev.mysql.com/doc/refman/5.0/en/update.html. You cannot refer to
the update table in a subquery.
PB
it into the
BLOB field using LOAD_FROM_FILE.
Slower I know but I get no errors.
Kerry
-Original Message-
From: Gleb Paharenko [mailto:[EMAIL PROTECTED]
Sent: 03 February 2006 11:28
To: mysql@lists.mysql.com
Subject: Re: update a Blob field using UPDATE
Hello.
Have you applied
Hi List,
I would like to know if it is possible to combine Insert and Update in one
SQL instruction. This is what I want to do:
I have two tables: one where I will perform and Update replacing m0 by
scr. If MySQL find a m0, it will need to perform an insert into a log
table including
Andre,
I tried this a couple weeks ago... I think you want the on duplicate
option for the INSERT query.
depends what version you have... I think this was introduced in mysql 4.1
insert into values () on duplicate key update set x=2,y=5;
unfortunately, the server I was testing
Oops, I meant to send this to the list so that everyone could benefit, not
just to Andre.
--
Rhino
- Original Message -
From: Rhino [EMAIL PROTECTED]
To: Andre Matos [EMAIL PROTECTED]
Sent: Saturday, February 11, 2006 12:11 PM
Subject: Re: Insert and Update together
No George. I took a look there before sent this email to the mysql list. My
case it is not a duplicate record. What I want is that if the update in one
table happen, it will be proceed by an insert in another table like a log of
changes.
Andre
On 2/11/06 12:48 PM, George Law [EMAIL PROTECTED
---
-Original Message-
From: Andre Matos [mailto:[EMAIL PROTECTED]
Sent: Sunday, 12 February 2006 2:23 PM
To: George Law; mysql@lists.mysql.com
Subject: Re: Insert and Update together
No George. I took a look there before sent this email
.
In the table there is a text field of up to length 4000 chars. I have
defined the column as blob in the MySQL table.
I can read the text field of the source table into a variable e.g.
mystring$. The MySQL table has been set, except for this data.
I thought to use
SQLString = UPDATE TheTable SET Notes
for this data.
I thought to use
SQLString = UPDATE TheTable SET Notes = + mystring$ + WHERE
TheTableRef = ' + Myref$ + ';
I get error:
You have an error in the SQL syntax
I have tried to search the manual for an example of updating a blob column
from a variable and cannot find one. I don't want to save
Is it normal for MySQL to not update fields that are already identical?
I am talking about an INNER JOIN UPDATE, when copying from table A over
table B.
My count did not match at the first run and when I did the second run, I
go a zero rows updated...
--
MySQL General Mailing List
For list
Hello.
If you set a column to the value it currently has, MySQL notices this
and does not update it. Perhaps it is the answer on your question. See:
http://dev.mysql.com/doc/refman/5.0/en/update.html
Nicolas Verhaeghe wrote:
Is it normal for MySQL to not update fields that are already
I'm trying to change a couple of replace statements to
insert...on duplicate key update (using Perl/DBI).
foreach my $key (keys %e_items) {
my $sql = insert table1
(id, date, time, uid, type, seq, value)
values
Hello.
Perhaps you have forgotten to add col_name=expr to the end of your
query. See:
http://dev.mysql.com/doc/refman/5.0/en/insert.html
Jonathan Mangin wrote:
I'm trying to change a couple of replace statements to
insert...on duplicate key update (using Perl/DBI).
foreach my $key (keys
values, but the format is
different ('001234' vs 1234).
Is it possible to create a update query that copies the 'foo' and 'bar' from
table dbA.A to dbB.B for each record in dbB.B?
--
Jørn Dahl-Stamnes
homepage: http://www.dahl-stamnes.net/dahls/
--
MySQL General Mailing List
For list archives
row affected (0.00 sec)
mysql select id+0 from ch;
+--+
| id+0 |
+--+
| 1234 |
+--+
Use something similar to:
update dbB, dbA set dbB.foo=dbA.foo, dbB.bar=dbA.bar where
dbB.id=dbA.id ;
See:
http://dev.mysql.com/doc/refman/5.0/en/update.html
Jørn Dahl-Stamnes wrote:
Assume
(0.04 sec)
mysql insert into ch set id='001234';
Query OK, 1 row affected (0.00 sec)
mysql select id+0 from ch;
+--+
| id+0 |
+--+
| 1234 |
+--+
Use something similar to:
update dbB, dbA set dbB.foo=dbA.foo, dbB.bar=dbA.bar where
dbB.id=dbA.id ;
See:
http
) wrote:
Hi,
I'm running a 5.0.16 instance on a Debian box (2.6.13 kernel). The
following statement causes a signal 11 without fail, and each time when
mysqld_safe restarts the daemon, no socket file is created:
UPDATE X_Products.product_details AS pd ,
X_Products.tblMaxProductStockDisplay
Gleb Paharenko wrote:
Hello.
Please, could you explain what does it mean 'Signal 11 without fail'.
Usually after receiving such a signal MySQL crashes. Of course, it
should do this in normal circumstances. What is in the error log? Check
if the problem still exists on official binaries of
Hello.
Resolve a stack trace and provide it to the list. See:
http://dev.mysql.com/doc/refman/5.0/en/crashing.html
http://dev.mysql.com/doc/refman/5.0/en/using-stack-trace.html
Now about the replication problem. As I've understood you have
triggers only on the slave. In my opinion, to solve
Gleb Paharenko wrote:
Hello.
Resolve a stack trace and provide it to the list. See:
http://dev.mysql.com/doc/refman/5.0/en/crashing.html
http://dev.mysql.com/doc/refman/5.0/en/using-stack-trace.html
- resolving the stack dump gives me this:-
0x8150650 + 135595600
0xe420 + -7136
Hi,
I'm running a 5.0.16 instance on a Debian box (2.6.13 kernel). The
following statement causes a signal 11 without fail, and each time when
mysqld_safe restarts the daemon, no socket file is created:
UPDATE X_Products.product_details AS pd ,
X_Products.tblMaxProductStockDisplay AS sd SET
Hi,
I have a 2 Date Columns in my table, how can I update the 2nd date column so
that the dates are 3 months previous to the orignial date column for every
row.
Thanks for your advice
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http
Hi Shaun
You could use DATE_ADD function with interval negative
Shaun wrote:
Hi,
I have a 2 Date Columns in my table, how can I update the 2nd date column so
that the dates are 3 months previous to the orignial date column for every
row.
Thanks for your advice
--
MySQL
Do you mean something like that?
UPDATE tablename SET date2=DATE_ADD(date1, INTERVAL -3 MONTH)
Regards,
Patrick
-Original Message-
From: Shaun [mailto:[EMAIL PROTECTED]
Sent: Monday, 16 January 2006 15:27
To: mysql@lists.mysql.com
Subject: UPDATE Date Column
Hi,
I have a 2
Thanks Patrick,
Will this work on 3.23?
Patrick Herber [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Do you mean something like that?
UPDATE tablename SET date2=DATE_ADD(date1, INTERVAL -3 MONTH)
Regards,
Patrick
-Original Message-
From: Shaun [mailto:[EMAIL
- tool for InterBase, Firebird, MySQL, Oracle MS SQL
Server
Upscene Productions
http://www.upscene.com
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com
Do you mean something like that?
UPDATE tablename SET date2=DATE_ADD(date1, INTERVAL -3 MONTH
Hi,
Thanks for your help.
Regards,
Jan
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Jan M schreef:
How do I update a record obtained from a query result while ensuring that:
1) The record is the actual record in the database not a possible duplicate,
e.g. is there a built-in record number identifying the actual DB record or
do I have to organise that in the table structure
Try this
UPDATE people
SETphone = CASE
WHEN LEFT(phone,4) = '405_' THEN MID(phone,5,20)
WHEN LEFT(phone,3) = '405' THEN MID(phone,4,20)
ELSE phone
END
FROM people
WHERE LEFT(phone,3) = '405'
AND LENGTH(phone
-tables.html
http://dev.mysql.com/doc/refman/5.0/en/innodb-transaction-model.html
Jan M wrote:
Hi,
Newbie question (MySql 5.0 using C API). I've searched the mysql
website/Internet but cannot find the answer.
How do I update a record obtained from a query result while ensuring
Hi,
Newbie question (MySql 5.0 using C API). I've searched the mysql
website/Internet but cannot find the answer.
How do I update a record obtained from a query result while ensuring that:
1) The record is the actual record in the database not a possible duplicate,
e.g. is there a built
Carlos Vasquez wrote:
How come this doesn't work?
Wp_photos.photo = IMG_1234.JPG
Pixelpost_pixelpost.headline = /this/path/to/directory/IMG_1234.JPG
So I need to just match the latter-bit of the file.
update pixelpost_pixelpost,wp_posts,wp_photos
set
pixelpost_pixelpost.headline
How come this doesn't work?
Wp_photos.photo = IMG_1234.JPG
Pixelpost_pixelpost.headline = /this/path/to/directory/IMG_1234.JPG
So I need to just match the latter-bit of the file.
update pixelpost_pixelpost,wp_posts,wp_photos
set
pixelpost_pixelpost.headline=wp_posts.post_title
I have 290 records in the database with backslashes. I want to remove the
backslashes. Why the query below doesn't remove backslashes?
update name set first_name = REPLACE(first_name,'','') where first_name
like '%%';
Hi,
What you perhaps could use is the REGEXP usage in your where clause.
Try this:
update name set first_name=replace(first_name, '\\', '') where
first_name regexp '';
The fun thing is that when you put '\\' instead of the '' after the
regexp function it doesn't work. But this sure
Danny Stolle wrote:
Hi,
What you perhaps could use is the REGEXP usage in your where clause.
Try this:
update name set first_name=replace(first_name, '\\', '') where
first_name regexp '';
The fun thing is that when you put '\\' instead of the '' after the
regexp function it doesn't
I have a situation where I need to update a record for a given key in a MySQL
table, but insert a record if the key doesn't exist. I could do this by doing
a SELECT on the key, then doing an UPDATE if anything comes back, or and INSERT
otherwise. This seems rather clunky though, and I'm
http://dev.mysql.com/doc/refman/5.0/en/replace.html
- Original Message -
From: steve [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Wednesday, December 28, 2005 6:57 AM
Subject: update or insert if necessary?
I have a situation where I need to update a record for a given key
Actually, you may be more interested in:
INSERT . ON DUPLICATE KEY UPDATE
- Original Message -
From: steve [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Wednesday, December 28, 2005 6:57 AM
Subject: update or insert if necessary?
I have a situation where I need to update
You should read
http://dev.mysql.com/doc/refman/4.1/en/insert.html
and maybe
http://dev.mysql.com/doc/refman/4.1/en/replace.html
-Original Message-
From: steve [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 28, 2005 8:57 AM
To: mysql@lists.mysql.com
Subject: update or insert
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
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
Ladies, gentlemen,
This week, Database Workbench 2.8.0 was released.
However, that build included an error with MySQL
and loading index metadata and an specific error with
Firebird/InterBase.
There's a new installer available at our website.
Below is the original announcement...
Hi Jeff, all!
Jeff Drew wrote:
Sporadically, the last few entries of a batch are not written. I'm writing
to a mysql database using JDBC. Here's a short version of my code. Does
anyone have suggestions on possible causes or other diagnostics?
I do not claim any JBDC knowledge, so I have
Sporadically, the last few entries of a batch are not written. I'm writing
to a mysql database using JDBC. Here's a short version of my code. Does
anyone have suggestions on possible causes or other diagnostics?
class DatabaseWriter{
int writeCount=0;
public DatabaseWriter(){
I am trying to update a couple of rows in a table by doing the
following:
update table
set column5 = number1
where column 1 = number2
and column1 = number3
but it is not working. I tried listing the conditions separated by
commas (where column 1 = number2, column1 = number3) and also didn't
Kraer, Joseph wrote:
I am trying to update a couple of rows in a table by doing the
following:
update table
set column5 = number1
where column 1 = number2
and column1 = number3
This appears to be correct syntax.
but it is not working.
We can't help you if you don't tell us what you mean
I guess that the problem is the reserved word table
Try it:
Update `table`
Set column5=number1
where column 1 = number2
and column1 = number3
But the sintax is ok
Regards!
-Mensaje original-
De: Kraer, Joseph [mailto:[EMAIL PROTECTED]
Enviado el: Miércoles, 30 de Noviembre de 2005 10
Kraer, Joseph [EMAIL PROTECTED] wrote on 11/30/2005 11:58:56 AM:
I am trying to update a couple of rows in a table by doing the
following:
update table
set column5 = number1
where column 1 = number2
and column1 = number3
but it is not working. I tried listing the conditions separated
Hi,
In your query you try to update on the condition column 1 = number2 and
column1 = number3.
I think what you want is column 1 = number2 or column1 = number3 .
If you use and it will try and found a record in column which has a value =
number2 and at the same time = number3.
hth,
melanie
Thank you, Shawn, for understanding what I meant and for explaining the
issue so clearly. I apologize to all others if I wasn't clear enough,
but, yes, I wanted to update two separate rows. Now, I understand why
an OR is needed; I'll study the other option too.
Thank you,
Joseph Tito Kraer
Hello.
I'm not a PHPMyAdmin guru, but at least LOAD DATA LOCAL feature (if it is
present in PHPMyAdmin) can be disabled due to some security reasons. See:
http://dev.mysql.com/doc/refman/5.0/en/load-data-local.html
Joe Herman wrote:
To those thinking of answering this question,
Joseph
update table
set column5 = number1
where column 1 = number2
and column1 = number3
but it is not working. I tried listing the conditions separated by
commas (where column 1 = number2, column1 = number3) and also didn't
work. What am I doing wrong?
No commas in the WHERE clause. WHERE
Hello.
I'm not PHPMyAdmin guru, but at least LOAD DATA LOCAL feature (if it is
present in PHPMyAdmin) can be disabled due to some security reasons. See:
http://dev.mysql.com/doc/refman/5.0/en/load-data-local.html
Joe Herman wrote:
To those thinking of answering this question,
it
pretty well.
-Sheeri
On 11/23/05, Mike OK [EMAIL PROTECTED] wrote:
Thanks for the point to the internals. I will keep this page bookmarked. I
read everything there regarding indexes and did not find the answer I was
looking for. I think what I need falls under the UPDATE statement
To those thinking of answering this question, There is additional
information.
For some reason, I found out that the version of PHPMyAdmin at my web
hosting provider was missing the Insert data from a text file into the
table feature found at the bottom of the page after clicking on the
name of
Hello.
don't think I will find the answer to this question in the normal manuals
but rather from someone / place that deals with the internals of the
system.
Mike
MySQL internals are available at:
http://dev.mysql.com/doc/internals/en/
Mike OK wrote:
I did read the manuals
Thanks for the point to the internals. I will keep this page bookmarked. I
read everything there regarding indexes and did not find the answer I was
looking for. I think what I need falls under the UPDATE statement (no
listing there). Specifically, what triggers the action for index re-builds
Mike,
The documentation at
http://dev.mysql.com/doc/refman/5.0/en/update.html explains that MySQL
is aware of the fact that it only needs to update different values --
for instance, it returns only the # of rows changed, not the # of rows
looked at. Given that, I will extrapolate that MySQL
- Original Message -
From: sheeri kritzer [EMAIL PROTECTED]
To: MySQL List mysql@lists.mysql.com
Sent: November 22, 2005 9:31 AM
Subject: Re: UPDATE and INDEX updates
Mike,
The documentation at
http://dev.mysql.com/doc/refman/5.0/en/update.html explains that MySQL
is aware of the fact that it only
-placed?? Does
MySQL look at each column value first to compare?? Mike
- Original Message -
From: sheeri kritzer [EMAIL PROTECTED]
To: MySQL List mysql@lists.mysql.com
Sent: November 22, 2005 9:31 AM
Subject: Re: UPDATE and INDEX updates
Mike,
The documentation at
http
: November 22, 2005 3:05 PM
Subject: Re: UPDATE and INDEX updates
You're going to have to read the manual on the different types of
indexes. Without knowing what kind of index (Hash, B-tree) you're
using and on what kind of table, I cannot help you.
Parts of Chapter 14 of the MySQL manual
Hi
I was wondering how the index process worked internally for UPDATE
statements. If I was to set a value for a column with the UPDATE statement
but the value was the same, would MySQL re-work the index?? I can check for
data change for each column inside of my code before UPDATE
I am doing a balance line comparison between the rows of an existing table
and a text file that has newer data in it. So I'm comparing the values
field by field to the existing rows in the table. If any of the field
values are different, I need to update the table with these new values
- Original Message -
From: mos [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Saturday, November 19, 2005 8:16 PM
Subject: Is Load Data Infile or Update is faster?
I am doing a balance line comparison between the rows of an existing table
and a text file that has newer data
501 - 600 of 2309 matches
Mail list logo