2011/10/10 09:19 -0400, Brandon Phelps
If this column(s) is/are a character type now, then you would need to have the
values in quotes.
Note that because of implicit conversion if they had numberic values no error
would be reported, but maybe the equality would not be exact.
That query looks fine. What error are you getting if you execute the query
from the CLI? Also is it possible that the s_id or owed columns are no longer
numeric data types? If this column(s) is/are a character type now, then you
would need to have the values in quotes.
-Brandon
On 10/10/20
Hello all.
I have recently finished my migration from an older server to a newer
server running RHEL 6. The MySQL version went from 5.0.77 to 5.1.52.
In my application, this query used to work just fine:
$paid_query = mysql_query("UPDATE $table_name SET owed = 0 WHERE s_id
= $student");
Where t
For the curious: As usual "select is not broken".
Lesson learned: Always watch out for warnings:
http://bugs.mysql.com/bug.php?id=41007
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Hi Gautam
nope yours is not a bug. That's all fine. Hex numbers are 64 bit
unsigned.
So for -1 you have to insert cast(0x as signed).
Cheers,
Daniel
Hi Daniel,
I can see the problem without using "update". However, I am a newbie
at
mysql,
so can't say for certain if it's
Hi Daniel,
I can see the problem without using "update". However, I am a newbie at
mysql,
so can't say for certain if it's a bug:
mysql> drop table if exists foo;
mysql> create table foo (id int signed, val bigint signed);
mysql> insert into foo values (0x, 0x), (-1, -1
Hi everybody -
I'm experiencing some really weird update behaviour (mysql 5.0) when
or'ing results from subselects using Long.MIN_VALUE.
But before I post a bug report I wanted to ask if I'm missing something.
drop table if exists foo;
drop table if exists bar;
create table foo (fooid int,
What I've done in situations like this is write SQL that generates the SQL I
need. I then pipe out to a file and pipe it back in, or just pipe from one
instance of mysql to another.
Example SQL:
SELECT
CONCAT('UPDATE main SET ', field, ' = ', id, ';')
AS update_sql
FROM map
Example command to
Hi all,
I'm trying to wrap my brain around folowing problem.
table main(code, field_1, field_2, field_3, , , field_51)
111, 'X', '', 'X',,,
222, '', '', 'X',,,
333, '', 'X', '' ,,,
444, '', '', '' ,,,
555, 'X','X', '' ,,,
table map(id, field)
1, 'field_1'
5, 'field_2'
9, 'field_3'
Did you successfully alter the table? What does SHOW CREATE TABLE give you?
mysql> CREATE TABLE test ( id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT
PRIMARY KEY, ts_create TIMESTAMP DEFAULT CURRENT_TIMESTAMP, ts_modify
TIMESTAMP );
Query OK, 0 rows affected (0.00 sec)
mysql> insert into test(id)
Hi,
I have a table with a time stamp column defined as
ts timestamp(14) NOT NULL
this is the first timestamp value in a series of timestamp columns.
Whenever I update a row in the table ts gets updated with the current
timestamp. I read from the documentaion that the first timestamp column
i
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 to
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(){
PreparedStat
Hi All,
I'm working on a guestbook and have a problem with updating a table with php..
in the guestbook entry, i have a textarea that allows users to enter their comments,
in multiple lines.
however, once i get it out to prepare to put into sql database, it becomes a single
line. i know t
At 12:03 -0300 7/5/04, j llarens wrote:
Hi people
I'm facing a (not huge) problem with mysqlimport.
The mysql version I'm using is MySQL
4.0.11a-gamma'-Max'
For updating a #29000 records table from fixed-lenght
ASCII file, I'm using a php script that gets a record
and executes and UPDATE for each o
Hi people
I'm facing a (not huge) problem with mysqlimport.
The mysql version I'm using is MySQL
4.0.11a-gamma'-Max'
For updating a #29000 records table from fixed-lenght
ASCII file, I'm using a php script that gets a record
and executes and UPDATE for each one: pretty SLOW.
SO I read carefully
echo $updatequery to screen and see what the sql looks like.
> I am trying to update a table from results generated from a select query,
> but can't seem to get the queries running right. The select query works
> fine, but when I try to use the results for an update it error out. Here
> is
> my
I am trying to update a table from results generated from a select query,
but can't seem to get the queries running right. The select query works
fine, but when I try to use the results for an update it error out. Here is
my query:
db_connect();
$query = "SELECT cst_SiteID FROM customer
Paul
Thanks alot that help out alot.
-Blake
Paul McNeil wrote:
You have to use
UPDATE MyTABLE set MyTABLE.1 = myValue.
Otherwise you are saying that the numeric value 1 = some other numeric
value.
God Bless
GOD BLESS AMERICA!
To God Be The Glory!
--
MySQL General Mailing List
For list arc
You have to use
UPDATE MyTABLE set MyTABLE.1 = myValue.
Otherwise you are saying that the numeric value 1 = some other numeric
value.
God Bless
GOD BLESS AMERICA!
To God Be The Glory!
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
Chip Wiegand wrote:
When running mysql from the command line (Putty terminal) and trying to do
some updates the updates fail. First the query I am running -
mysql> update warranty_temp, warranty_old set
warranty_old.OwnerName=warranty_temp.OwnerName where
warranty_old.WarrantyID between 75 a
When running mysql from the command line (Putty terminal) and trying to do
some updates the updates fail. First the query I am running -
mysql> update warranty_temp, warranty_old set
warranty_old.OwnerName=warranty_temp.OwnerName where
warranty_old.WarrantyID between 75 and 100 AND warranty_tem
Hi,
I've recently made the move over from Access to MySQL.
So far, everything has been fine.
I'm using:
Win2K server (ASP)
WinMySQLadmin 1.4,
MyCC 0.8.4-alpha,
MyODBC 3.51 and
MySQL 3.23.51-nt
First problem:
x27;DLV')
where
dep.Ref = arr.Ref
and dep.Timestamp = 'DEP'
Best regards,
Mikhail.
- Original Message -
From: "Morsky Juha" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 26, 2002 10:06 AM
Subject: Update problem in MySQL
&
Do anyone has a idea how to Insert (create SQLQuery) from onetable to an
other table as
decripted under:
Here is the orginal Table:
Table1:
Ref | Timestamp | ActionDate
---+-+
001 | DEP + 2002/01/02
AIL PROTECTED]>
Sent: Wednesday, August 28, 2002 5:15 PM
Subject: SQL - Update problem
> Hi,
>
> how can I do sql command like this:
>
> update sekce set pocet = count(*) from odkaz where odkaz.sekce_id =
sekce.id
>
> Thanks for answer
>
> j.
>
>
>
COMPANY
Permanent e-mail address : [EMAIL PROTECTED]
[EMAIL PROTECTED]
- Original Message -
From: "Jakub Mach" <[EMAIL PROTECTED]>
To: "Mysql" <[EMAIL PROTECTED]>
Sent: Wednesday, August 28, 2002 5:15 PM
Subject: SQL
Jakub,
Wednesday, August 28, 2002, 5:15:01 PM, you wrote:
JM> how can I do sql command like this:
JM> update sekce set pocet = count(*) from odkaz where odkaz.sekce_id = sekce.id
First: multi-table updates is supported only since 4.0.2
Second: even on 4.0.2 you can't do it with above query
-
s supported by MySQL, and if so, how...
Thanks,
Wouter
-Oorspronkelijk bericht-
Van: Mary Stickney [mailto:[EMAIL PROTECTED]]
Verzonden: August 28, 2002 16:37
Aan: Jakub Mach; Mysql
Onderwerp: RE: SQL - Update problem
you cant update from is NOT supported
-Original Message--
you cant update from is NOT supported
-Original Message-
From: Jakub Mach [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 28, 2002 9:15 AM
To: Mysql
Subject: SQL - Update problem
Hi,
how can I do sql command like this:
update sekce set pocet = count(*) from odkaz where
Hi,
how can I do sql command like this:
update sekce set pocet = count(*) from odkaz where odkaz.sekce_id = sekce.id
Thanks for answer
j.
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
h
Good afternoon!
I have a table of subscribers from which I select data to create another
table which will indicate which of these subscribers should get a reminder
letter. I need to set a column in the subscriber file indicating the date of
the reminder, so that the subscriber will not be sent an
It would seem strange to implement one and not the other? The help does say
that you can use it and does keep the create options now.
Does anyone know if this will be implemented in the next .5x release?
Ross
Me& writes:
> Hi!
>
> don't think ON UPDATE is supported.
>
> The manual :
Hi!
don't think ON UPDATE is supported.
The manual : http://www.innodb.com/ibman.html doesn't mention anything about
it except :
Starting from version 3.23.50 you can also associate the ON DELETE CASCADE
or ON DELETE SET NULL clause with the foreign key constraint.
EG
> When I try to change
When I try to change the id field in the parent table below, I get the
error: 1217 - Cannot delete a parent row; a foreign key constraint fails.
What have I got wrong? Shouldn't it cascade the changes that were made to
the parent down to the child table?
This is done with Mysql 3.23.50-max
It seems like you have hit a file size limit.
Soalris has a 2 Gig ( or is it 4Gig) file size limit which is
restricting your database.
You could get past this by breaking up your data into different
segments, eg. group the data by month and store it in monthly tables,
reducing the size of the dat
Hello,
I am new to MYSQL
platform: Sun Solaris 2.6
mysql version: 3.22.32
I upgrade the hard drive from 4G to 18G as database
was increasing and causing problem now space problem
is solved and got in to another problem.
Database is not getting updated through
C programs and perl scripts( that
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, October 20, 2001 4:49 PM
> To: [EMAIL PROTECTED]
> Subject: UPDATE problem
>
>
>
> Hi,
>
> I am encountering a problem while I am updating records of a
Hi,
I am encountering a problem while I am updating records of a table.
Basically its a problem of updation of records using pattern matching.
I want all the recods that end with letter "s" be updated to record
without the letter "s" at the end. For eg, I want a record "things"
to be converted
Will,
First of all, if I sounded condescending, it was not my intent. I apologize
if that's how you (or anyone else) took it. I will, however, respond to
your smoking response to mine:
> > I think no-one's replied because the answer is really simple
>
> Oh I don't know Jay, I've seen some thre
s many points with your users
as it did with me?
Will French
> -Original Message-
> From: Jay Fesco [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 24, 2001 8:30 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
> [EMAIL PROTECTED]
> Subject: RE: Update problem
>
&
>
> imho, the fact that mysql does not support joins in UPDATE and DELETE
> statements is by far its greatest weakness. I have posted a couple of
> messages to this group to see what creative work-arounds others
> have used to
> fill this gaping hole in functionality. Alas, no one has felt
> lik
IL PROTECTED]
> Subject: Update problem
>
>
> I am having problems getting an update to work correctly. Assume
> that I have two tables, employee and office. Employee has two
> fields, employee_id and employee_name, and office has three
> fields, office_id, office_number, &am
I am having problems getting an update to work correctly. Assume that I have two
tables, employee and office. Employee has two fields, employee_id and employee_name,
and office has three fields, office_id, office_number, & employee_id.
I have been using inner join to link the tables together
Hello,
I have created a predictionscompetition and some code counts te total score of a match
of a person.
On the screen it workes, but in de database it goes wrong. Each person gets the total
of the last person. There must be something wrong with the update statement.
I hope someone can help m
You only need to specify SET once.
update Pictures set Date_Posted = '2001-05-09', Notes = 'Test' where ID
='1';
- Original Message -
From: "Barry L. Jeung" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 11, 2001
I don't believe you need the second set
update Pictures set Date Posted = '2001-05-09', Notes = 'Test' where
ID ='1';
I think that should work
-Original Message-
From: Barry L. Jeung [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 11, 2001 3:56 PM
To
Ok, based on the given syntax from the mysql manual..
UPDATE [LOW_PRIORITY] [IGNORE] tbl_name
SET col_name1=expr1, [col_name2=expr2, ...]
[WHERE where_definition]
[ORDER BY ...]
[LIMIT #]
I've been trying to update some records in a test database I've been
playing with. I'm inexp
petro writes:
> Hello!
> Need some help.
> I have two tables
> t1 with fields id and site
> t2 with fields id, from, to, koef
> I want to update t2 set koef=2 if the from field in t2 table exist in
> t1.url
> such update return error.
> update t2, t1 set t2.koef=0 where t2.from=t1
Hello!
Need some help.
I have two tables
t1 with fields id and site
t2 with fields id, from, to, koef
I want to update t2 set koef=2 if the from field in t2 table exist in
t1.url
such update return error.
update t2, t1 set t2.koef=0 where t2.from=t1.site
Thank yoo very much.
-
50 matches
Mail list logo