[snip]
I'm quite new with mySQL, i have bought the book Mastering MySQL4 but i
don'f find a solution for my problem there.
There are no triggers in version 4 if 'im correct, but i want to export
a table (small one) every time there is a new record or a record
modified.
Whats the way to do this,
Hi,
Try using the DBI-trace(2) method. This will print a lot of stuff on
your screen however it shows the UPDATE after it has bound all the
variables etc. You will see the statement as it will be passed to the
database. This has saved me a lot of work recently in showing up bugs
very quickly
Hi,
I use the following statement to update a table, but I don't see the
testing record being updated:
$udpate_sql = qq {update transaction
set salesvolume=$salesvol,
netsales=$netsales, transtype=$transtype,
returnreason=$returnreason
Please also note hat UPDATE returns the number of records updated. If your
UPDATE returns 0, you know that the record does not exist, and you might
want to INSERT instead.
There is one situation where the number of records updated will return
0, yet the row exists. If you update the record
[EMAIL PROTECTED] wrote:
Please also note hat UPDATE returns the number of records updated. If your
UPDATE returns 0, you know that the record does not exist, and you might
want to INSERT instead.
There is one situation where the number of records updated will return
0, yet the row exists
Hi,
Without using Select statement, how can I execute Insert SQL statement
if Update action is failed?
I may be asking for too much. If Select statemnet have to be used to
determine the existence of a recordset, what is an efficient way to
execute Insert if Update is failed? I m using MySQL 5.0
At 2005-01-15 14:48, you wrote:
Without using Select statement, how can I execute Insert SQL statement if
Update action is failed?
I may be asking for too much. If Select statemnet have to be used to
determine the existence of a recordset, what is an efficient way to
execute Insert if Update
Please also note hat UPDATE returns the number of records updated. If your
UPDATE returns 0, you know that the record does not exist, and you might
want to INSERT instead.
At 2005-01-15 14:54, you wrote:
At 2005-01-15 14:48, you wrote:
Without using Select statement, how can I execute Insert
Quoting sam wun [EMAIL PROTECTED]:
HI,
the following insert/update produced error. I m using MySQL 5.0.
$insert_sql = qq {insert into inventory
(prodcode,qty,lastupdatedate,prodname,basename,vendorname,cost)
values (?,?,?,?,?,?,?) ON DUPLICATE KEY
UPDATE
Hi,
Does anyone have a Perl Script (or other) to transform a MySql insert into an
update (or
vice-versa)???
zzapper (vim, cygwin, wiki zsh)
--
vim -c :%s%s*%CyrnfrTfcbafbeROenzSZbbyranne%|:%s)[R-T]) )Ig|:norm G1VGg?
http://www.vim.org/tips/tip.php?tip_id=305 Best of Vim Tips
--
MySQL
On Fri, 14 Jan 2005 18:42:41 +, wrote:
Hi,
Does anyone have a Perl Script (or other) to transform a MySql insert into an
update (or
vice-versa)???
Just wrote a QAD (Quick and dirty) script see below, has no error handling
#!perl
# sedit.pl
# description : Transform a mysql insert
HI,
the following insert/update produced error. I m using MySQL 5.0.
$insert_sql = qq {insert into inventory
(prodcode,qty,lastupdatedate,prodname,basename,vendorname,cost)
values (?,?,?,?,?,?,?) ON DUPLICATE KEY
UPDATE
qty
Hello.
You may use some recommendations from:
http://dev.mysql.com/doc/mysql/en/Full_table.html
Jocelyn Fournier [EMAIL PROTECTED] wrote:
Hi,
I've just encountered a strange problem when trying to update a table :
UPDATE searchmainhardwarefr0, searchjoinhardwarefr0 SET
Hi,
I've just encountered a strange problem when trying to update a table :
UPDATE searchmainhardwarefr0, searchjoinhardwarefr0 SET
searchmainhardwarefr0.numeropost=searchjoinhardwarefr0.topic WHERE
searchmainhardwarefr0.numreponse=searchjoinhardwarefr0.numreponse;
ERROR 1114 (HY000): The table
i'm still using 3.23
can anyone show me how to activate update log
by modifying the my.cnf/ my.ini
And a question about update log,
does it only record update and delete (mysql documentation),
how about insert? do the log recorded those too?
thanks
update log
by modifying the my.cnf/ my.ini
And a question about update log,
does it only record update and delete (mysql documentation),
how about insert? do the log recorded those too?
thanks
__
Do you Yahoo!?
The all-new My Yahoo! - What
Chenri J wrote:
i'm still using 3.23
can anyone show me how to activate update log
by modifying the my.cnf/ my.ini
Show you?
It is not clear what you want. Do you need help starting the editor?
What OS are you using? On Windows systems Notepad can be used to edit
the configuration files.
Which
Chenri J wrote:
one more question, how about when i'm using 'BEGIN'
and doesn't end it with 'COMMIT' neither 'ROLLBACK'
what will happen.
I've tried before and nothing happen but does anyone have an opinion?
This depends on a number of things:
If the table handler in question does not support
[snip]
I read 6) as saying that until you complete all of the calculations on a
row, you don't change the data for the row. I could even interpret this
as saying that you don't update ANY row on the table until you have
completed the calculations for ALL of the rows.
I read 7) as saying that you
[snip]
Does anyone have a sample of a simple update statement I can run to update a
field in a table to all uppercase values.
[/snip]
UPDATE mytable SET mycol=UPPER(mycol);
---
Tom Crimmins
Interface Specialist
Pottawattamie County, Iowa
--
MySQL General Mailing List
For list archives: http
Does anyone have a sample of a simple update statement I can run to update a
field in a table to all uppercase values.
Any help or web references are appreciated.
://www.ncb.ernet.in/education/modules/dbms/SQL99/ansi-iso-9075-2-1999.pdf)
ISO/IEC 9075-2:1999 (E)
14.10 update statement: searched (p 687)
9) The update source of each set clause is effectively evaluated for
each row of T before any
row of T is updated.
10) A set clause specifies one or more object columns
to
be
handled at once. I know MySQL cannot handle handle the query as one big
block
behind the doors, but I wonder why I / my application has to know about
these
internals in this case.
UPDATE statements
work with the JOIN order and update each table in succession.
Dependent
on the number of rows affected
.
And everything between sending and the receiving the result I expect to
be
handled at once. I know MySQL cannot handle handle the query as one big
block
behind the doors, but I wonder why I / my application has to know about
these
internals in this case.
UPDATE statements
work with the JOIN
[EMAIL PROTECTED] schrieb:
I snipped the discussion down to the SQL-statements with some
explanational text. I hope it does not break reading.
[snip]
UPDATE table1
INNER JOIN table2 ON table2.ID_table1=table1.ID
SET table2.value=table2.value-IF(table1.condition=7,1,0),
table1.condition=8
[snip]
I hope I am not so naive that Kai and I are the only two who sees a
problem with this behavior. Some of you may think this is a feature
but I do not like it because that means that calculational errors will
occur simply by inverting column positions (putting one before the
other) within a
) of multi-table updates the
behavior is exactly the same as this.
I don't think it is clear, what Shawn's and my point is.
It is clear, that a multi table update will be executed in a serialized
manner. I don't want to think of the difficulties in implementing a true
atomic multi table update
? That could imply that
I need to change the design of my tables so that my update statements will
execute in the correct order. If only the changes had happened in the
sequence specified in Kai's original SET statement... (sigh) 8-D
Shawn Green
Database Administrator
Unimin Corporation - Spruce
[snip]
So the question is not, if a multi table update should be implemented
serialized. The answer is clear: yes it should.
The question is, on which data the subsequent updates should work.
[/snip]
It should work on the data specified in the update query. Each set
statement is isolated
of a SET clause? Why does the query engine seem to
revert to processing changes in table column order and not maintain
the statement sequence order as specified by the user? That could
imply that I need to change the design of my tables so that my update
statements will execute in the correct order
the design of my tables so that my update
statements will execute in the correct order. If only the changes had
happened in the sequence specified in Kai's original SET statement...
(sigh) 8-D
[/snip]
It is because you are defining the order of the update in the UPDATE
statement itself
[snip]
... a bunch of stuff
[/snip]
It alomost sounds as if you're coming from a M$ campwhat you
describe are VIEWS.
Anyhow, the ANSI SQL standards specify some of the behaviors we have
been talking about. Many DB manufacturers use the standards and
implement other features like you
to match the last update applied to it.
But they don't change their values (for calculation purposes) until the
engine finishes the row.
Anyhow, it has been a good discussion. No bugs were uprooted and
everyone's understanding may have risen a notch. After a couple of
decades using SQL I
[snip]
Anyhow, it has been a good discussion. No bugs were uprooted and
everyone's understanding may have risen a notch. After a couple of
decades using SQL I still find interesting topics to discuss.
Yes, I too have enjoyed this conversation. Thank you for thinking out
loud with me on such an
[snip]
...tons o' stuff...
[/snip]
BTW...Happy New Year!
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
[snip]
I would be deliriously happy if someone could explain WHY these
statement _should_ have different results. If I am wrong and these
UPDATE statements are supposed to provide different results, I would
like to learn how I became so confused over something this fundamental.
Until I get
[snip]
Although my question goes in that direction, it is more about why this
statement
does not act atomically from my applications point of view.
update table2, table1
SET table2.value=table2.value-IF(table1.condition=7,1,0),
table1.condition=8
WHERE table1.ID = table2.ID_table1
[/snip
Hi,
I am having trouble with an UPDATE query. I have three tables as defined
below. My database holds data for bookings. Each booking relates to a
project. Each project has many tasks, one of which is a booking. I have now
added the column Task_ID to the bookings table. How can I update all
[snip]
I am having trouble with an UPDATE query. I have three tables as defined
below. My database holds data for bookings. Each booking relates to a
project. Each project has many tasks, one of which is a booking. I have
now
added the column Task_ID to the bookings table. How can I update all
Sorry Jay,
I am using version 3.23.54, unfortunately I am unable to supply test data
but basically I need to update the Task_ID column for the Bookings table so
that it is the same as the Task_ID for Tasks and the Task_Name is 'Booking'
and the Bookings Project_ID is the same as the Tasks
[snip]
I am using version 3.23.54, unfortunately I am unable to supply test
data
but basically I need to update the Task_ID column for the Bookings table
so
that it is the same as the Task_ID for Tasks and the Task_Name is
'Booking'
and the Bookings Project_ID is the same as the Tasks
Zitat von Jay Blanchard [EMAIL PROTECTED]:
[snip]
Although my question goes in that direction, it is more about why this
statement
does not act atomically from my applications point of view.
update table2, table1
SET table2.value=table2.value-IF(table1.condition=7,1,0),
table1
Sorry for duplicating this message. But I sent the other one with the wrong
subject.
Hi,
An SQL-statement that is conceptually equal to the following caused some
astonishment.
UPDATE table1
LEFT JOIN table2 ON table2.ID=table2.ID_table1
SET table2.value=table2.value-IF(table1.condition=7,1,0
[snip]
UPDATE table1
LEFT JOIN table2 ON table2.ID=table2.ID_table1
SET table2.value=table2.value-IF(table1.condition=7,1,0),
table1.condition=8
WHERE table1.ID=$id
Is this behavior correct?
[/snip]
In the sense that it did what was given to it in the query, yes. From
http://www.mysql.com
Zitat von [EMAIL PROTECTED]:
One reason may be due to your ON condition.
ON table2.ID=table2.ID_table1
You reference table 2 twice and I doubt that on the table2 table id equals
id_table1 very often. Because table2 is LEFT JOINed to table1, you will
only be able to update the rows
Jay Blanchard [EMAIL PROTECTED] wrote on 12/28/2004
10:21:43 AM:
[snip]
UPDATE table1
LEFT JOIN table2 ON table2.ID=table2.ID_table1
SET table2.value=table2.value-IF(table1.condition=7,1,0),
table1.condition=8
WHERE table1.ID=$id
Is this behavior correct?
[/snip]
In the sense
.
ON table2.ID=table2.ID_table1
You reference table 2 twice and I doubt that on the table2 table id
equals
id_table1 very often. Because table2 is LEFT JOINed to table1, you
will
only be able to update the rows that match your ON condition. Again,
that
would mean that you have nothing
://www.mysql.com/update
You are correct in your belief that 4.1.x does not support triggers and
or SP. Given that, I would suggest that the OP utilize his programming
language to generate these actions.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe
INTO table1 VALUES (2,8);
CREATE TABLE table2 (
ID int(10) unsigned NOT NULL default '0',
ID_table1 int(10) unsigned NOT NULL default '0',
value int(10) unsigned NOT NULL default '0'
) TYPE=InnoDB;
INSERT INTO table2 VALUES (1,1,5);
INSERT INTO table2 VALUES (2,2,2);
--
And the query:
UPDATE
[snip]
And the query:
UPDATE table1
INNER JOIN table2 ON table2.ID_table1=table1.ID
SET table2.value=table2.value-IF(table1.condition=7,1,0),
table1.condition=8
WHERE table1.ID IN (1,2)
After that the value's in table2 are still 5 and 2. But I would expect
the 5 to
be a 4.
[/snip
',
ID_table1 int(10) unsigned NOT NULL default '0',
value int(10) unsigned NOT NULL default '0'
) TYPE=InnoDB;
INSERT INTO table2 VALUES (1,1,5);
INSERT INTO table2 VALUES (2,2,2);
--
And the query:
UPDATE table1
INNER JOIN table2 ON table2.ID_table1=table1.ID
SET table2.value=table2.value
Jay Blanchard [EMAIL PROTECTED] wrote on 12/28/2004
11:38:58 AM:
[snip]
And the query:
UPDATE table1
INNER JOIN table2 ON table2.ID_table1=table1.ID
SET table2.value=table2.value-IF(table1.condition=7,1,0),
table1.condition=8
WHERE table1.ID IN (1,2)
After that the value's
Zitat von Jay Blanchard
[snip]
And the query:
UPDATE table1
INNER JOIN table2 ON table2.ID_table1=table1.ID
SET table2.value=table2.value-IF(table1.condition=7,1,0),
table1.condition=8
WHERE table1.ID IN (1,2)
After that the value's in table2 are still 5 and 2. But I would expect
Ahhh, thats very good to know. Thank you.
On Wed, 2004-12-15 at 19:09 -0500, Harrison Fisk wrote:
No.
In InnoDB an UPDATE is done as a DELETE/INSERT internally because it
is
multiversioning and it has to be able to rollback in case of a
problem.
So the UPDATE effectively does
I'm currently doing a large number of REPLACE queries, I know that these
evaluate as if doing a DELETE/INSERT pair, and I'm wondering if this is
true on a disk io level as well with extra io occuring for the delete,
and then re-insertion, vs what would occur with an UPDATE.
The way it works
,
and then re-insertion, vs what would occur with an UPDATE.
The way it works roughly each row gets updated around 12-24 times, the
updated do not affect the primary key, or any of the other keys for that
matter. The table is INNODB.
So I'm thinking if the row is deleted then re-inserted
if this
is
true on a disk io level as well with extra io occuring for the
delete,
and then re-insertion, vs what would occur with an UPDATE.
The way it works roughly each row gets updated around 12-24 times,
the
updated do not affect the primary key, or any of the other keys for
that
matter. The table
John McCaskey wrote:
I'm currently doing a large number of REPLACE queries, I know that these
evaluate as if doing a DELETE/INSERT pair, and I'm wondering if this is
true on a disk io level as well with extra io occuring for the delete,
and then re-insertion, vs what would occur with an UPDATE
Once each day I have a PHP application that reads a legacy dBase
format file and updates a customer table in a MySQL database. The PHP
script reads each dBase record, searches for it in the table, updates
the field values if they have changed, or creates a new record in the
MySQL database if one
(not all) from the example row
into the new customer's row within the same table. I thought, that this
is easily done using UPDATE ... SELECT ..., but after failing and
searching quite a bit I found the last line in the UPDATE-syntax
documentation saying: Currently, you cannot update a table and select
columns (not all) from the example row
into the new customer's row within the same table. I thought, that this
is easily done using UPDATE ... SELECT ..., but after failing and
searching quite a bit I found the last line in the UPDATE-syntax
documentation saying: Currently, you cannot update a table
(that is, the one selected by USE) is db_name. To
specify more than one database, use this option multiple times, once
for each database. Note that this will not replicate cross-database
statements such as UPDATE some_db.some_table SET foo='bar' while
having selected a different database or no database
On Dec 8, 2004, at 9:12 AM, Jay Ess wrote:
I am not using cross database updates. It is all on one database but
the update uses two tables.
The query update content_review_site as a,site_rating_factors as b
set a.overall_rating = 77 where a.content_id=243 is a stripped down
version of a bigger
I have a problem with an update query not replicating through to the slave.
The query is update content_review_site as a,site_rating_factors as b set
a.overall_rating = 77 where a.content_id=243
Version : 4.0.22
OS : Linux X86
How to replicate the error.
CREATE TABLE content_review_site
selected by USE) is db_name. To
specify more than one database, use this option multiple times, once
for each database. Note that this will not replicate cross-database
statements such as UPDATE some_db.some_table SET foo='bar' while
having selected a different database or no database
URL:http
-Original Message-
From: Luciano Pulvirenti [EMAIL PROTECTED]
To: [EMAIL PROTECTED] [EMAIL PROTECTED]
CC:
Subject: Serious error in update Mysql 4.1.7
Sent: Fri, 03 Dec 2004 08:18:05 GMT
Received: Fri, 03 Dec 2004 08:22:55 GMT
Read: Fri, 03 Dec 2004 09:24:15 GMT
I am trying Mysql
Hello.
Did you read all promptings at:
http://dev.mysql.com/doc/mysql/en/Full_table.html
Manish [EMAIL PROTECTED] wrote:
I am trying to execute this query and it is failing with Table is full error
(I know I can make temp tables big).
update t1, t2
set t1.XXX=1
where t1.YYY=t2
I am trying to execute this query and it is failing with Table is full error
(I know I can make temp tables big).
update t1, t2
set t1.XXX=1
where t1.YYY=t2. and t2. like '%X%';
My t1 has 10,00,000+ records and t2 has about 70,000 records. I would like
to know how can I optimize
, but doesn't.
We cannot guess what's wrong. Please enter your command,
UPDATE listings SET map = CONCAT(ML, '.png') WHERE ML '';
get your error message, and then copy/paste the whole thing into your
next message. That way, someone should spot the problem.
Michael
Thomas McDonough wrote:
That did
enter your command,
UPDATE listings SET map = CONCAT(ML, '.png') WHERE ML '';
get your error message, and then copy/paste the whole thing into your
next message. That way, someone should spot the problem.
Michael
Thomas McDonough wrote:
That did not do it. I'm still getting the same error
I'm trying to set all the values of column 'map' to the value of column
ML and '.png'. My intuition and an extensive reading of the manual and
mail archives tell me to do it like this:
mysql update listings set map= concat (ML, '.png') where ML'';
but all I get is this:
ERROR 1064 (42000): You
Thomas McDonough wrote:
I'm trying to set all the values of column 'map' to the value of column
ML and '.png'. My intuition and an extensive reading of the manual and
mail archives tell me to do it like this:
mysql update listings set map= concat (ML, '.png') where ML'';
but all I get
Thomas McDonough wrote:
I'm trying to set all the values of column 'map' to the value of
column ML and '.png'. My intuition and an extensive reading of the
manual and mail archives tell me to do it like this:
mysql update listings set map= concat (ML, '.png') where ML'';
mysql update
archives tell me to do it like this:
mysql update listings set map= concat (ML, '.png') where ML'';
mysql update listings set map= concat(ML, '.png') where ML'';
Lose the space between 'concat' and '('
but all I get is this:
ERROR 1064 (42000): You have an error in your SQL syntax; check the
manual
At this point, what you say you are doing should work, but doesn't. We
cannot guess what's wrong. Please enter your command,
UPDATE listings SET map = CONCAT(ML, '.png') WHERE ML '';
get your error message, and then copy/paste the whole thing into your next
message. That way, someone
Using mySQL 4.0, I would like to know how I can code a query that will change
the value of Participants.Active from Y to N is for three or more CONSECUTIVE
sessions they have Attendance.Present = 'No'?
The Attendance Table has Attendance.Session which coresponds to
Sessions.SessionID and
I am curious about doing something simular to this... does anyone have an idea
On Wed, 24 Nov 2004 00:43:32 -0500, list 123. list wrote:
Using mySQL 4.0, I would like to know how I can code a query that will change
the value of Participants.Active from Y to N is for three or more CONSECUTIVE
Hello list,
I am getting the following error when i am loading data (Tab seperated data)
into a table which has reference to a primary key table. There is data in the
primary key table, but still this error is being thrown.
ERROR 1216: Cannot add or update a child row: a foreign key constraint
1216: Cannot add or update a child row: a foreign key constraint
fails
Your data obviously has a row where the constraints are not valid. Either
validate your data, or turn off the foreign key constraints temporarily when
loading the data.
--
MySQL General Mailing List
For list archives: http
. I have recently add the following line to the slave's my.cnf file:
replicate-wild-do-table=abe_exp.%
There are no more replication rules in that file. Both tables included in
the multitable update were in this database (abe_exp).
So this is a bug.
I suggest then that you file a bug report at http
I know that having a fulltext index on a table slows inserts and updates
down (or I think I do...might have miss read something)
I have a large table that uses fulltext which I plan to update nearly
90% of the rows (400,00+) and add new ones.
It currently takes around 35 minutes to remove
Hi!
On Nov 15, John Smith wrote:
I know that having a fulltext index on a table slows inserts and updates
down (or I think I do...might have miss read something)
I have a large table that uses fulltext which I plan to update nearly
90% of the rows (400,00+) and add new ones.
It currently
the following line to the slave's my.cnf file:
replicate-wild-do-table=abe_exp.%
There are no more replication rules in that file. Both tables included in
the multitable update were in this database (abe_exp).
So this is a bug.
--
./ premax
./ [EMAIL PROTECTED]
./ koniec i bomba, a kto czytal ten traba
I'm executing on master a long and complicated query such:
UPDATE (lots of tables, lots of LEFT JOIN) SET ... WHERE .
The query updates i.e. 3816 rows.
The query DOES replicate do master's and slave's binary log.
But it DOES NOT execute on slave. 3816 rows are not updated on slave
and slave
I'm executing on master a long and complicated query such:
UPDATE (lots of tables, lots of LEFT JOIN) SET ... WHERE .
Okey, I simplified the query to:
-
UPDATE
tKsidata,
tKsiabeksiazki
SET
tKsidata.STAN_REALNY=tKsiabeksiazki.STAN
WHERE
tKsidata.ksi='0815120877
Przemyslaw Popielarski wrote:
I'm executing on master a long and complicated query such:
UPDATE (lots of tables, lots of LEFT JOIN) SET ... WHERE .
Okey, I simplified the query to:
-
UPDATE
tKsidata,
tKsiabeksiazki
SET
tKsidata.STAN_REALNY=tKsiabeksiazki.STAN
WHERE
Hi.
If your table has a unique index on field 'name',
then use
load data infile 'file' replace into table 'table';
Lewick, Taylor [EMAIL PROTECTED] wrote:
Can I perform an update on a table using load data infile..?
If I have the following table...
Name Score Rank
I have two tables. One has a list of customers. The other has a record
of customer transactions including unix datestamps of each transaction.
I've added a field to the customer table called First_Transaction
I want to update this field with the datestamp of the first transaction
for each
Break it down into two steps. Compute your new values by customerid, then
update your customer table with your computed data.
CREATE TEMPORARY TABLE tmpFirstTran
SELECT CustID, min(Datestamp) as mindate
from Transactions
group by CustID;
update Customer c INNER JOIN tmpFirstTran ft ON ft.CustID
Yeah I thought of that but was hoping not to have to use a temp table.
Thanks!
Jeff
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, November 05, 2004 9:25 AM
To: Jeff McKeon
Cc: [EMAIL PROTECTED]
Subject: Re: Update query help
Break it down into two
Hello Gleb,
Please read the notes about MySQL on Linux:
http://dev.mysql.com/doc/mysql/en/Linux.html
I don't find anything specific to my problem there, sorry!
My Linux installation seems to be missing something that the
bdb part of MySQL 4.1 needs and which was not needed by v4.0
and
On Wed, 3 Nov 2004 08:31:18 -0500 (EST), Ed Curtis [EMAIL PROTECTED] wrote:
I'm trying to get a slash in a variable into my database and am having
some trouble. If the variable = 1 1/2 it echoes to the screen correctly
but it seems to strip the 1/2 off the variable when updating the value to
I'm trying to get a slash in a variable into my database and am having
some trouble. If the variable = 1 1/2 it echoes to the screen correctly
but it seems to strip the 1/2 off the variable when updating the value to
the database.
Just FYI to everyone replying:
Ed replied to me personally
Can I perform an update on a table using load data infile..?
If I have the following table...
Name Score Rank
John NULL NULL
Susan NULL NULL
And I have a data file that has...
John,95,1
Susan,89,2
Any idea if this can be done?
Thanks,
--
MySQL General Mailing List
For list archives
I'm trying to get a slash in a variable into my database and am having
some trouble. If the variable = 1 1/2 it echoes to the screen correctly
but it seems to strip the 1/2 off the variable when updating the value to
the database. I'm using php and a form select list to get this value from
a
Hi.
What type of the field in which you insert?
Send us output of
SHOW CREATE TABLE 'table'.
Ed Curtis [EMAIL PROTECTED] wrote:
I'm trying to get a slash in a variable into my database and am having
some trouble. If the variable = 1 1/2 it echoes to the screen correctly
but it
Do you use POST or GET in the form?
Try with a post.
Santino
At 8:31 -0500 3-11-2004, Ed Curtis wrote:
I'm trying to get a slash in a variable into my database and am having
some trouble. If the variable = 1 1/2 it echoes to the screen correctly
but it seems to strip the 1/2 off the variable when
Hi All,
I have o little (I think) doubt:
If I use a query UPDATE LOW PRIORITY and right after
I execute a SELECT in the same table/column.
Will I receive the correct result or only after MySQL commit
the data?
Any help would be appreciated,
Thanks,
Ronan
--
MySQL General Mailing List
At 12:26 -0300 11/1/04, Ronan Lucio wrote:
Hi All,
I have o little (I think) doubt:
If I use a query UPDATE LOW PRIORITY and right after
I execute a SELECT in the same table/column.
Will I receive the correct result or only after MySQL commit
the data?
What is the correct result?
Any help would
What is the correct result?
The correct result is the data in the updated column after commit.
For example, if I have:
Table1
=
- id
- name
INSERT INTO Table1 (id, name) VALUES (1, 'AAA')
UPDATE LOW PRIORITY Table1
SET name = 'BBB'
SELECT name
FROM Table1
Will it return BBB?
Thanks
801 - 900 of 2309 matches
Mail list logo