gt;> >
>> > create table Test {
>> > cid int(9) NOT NULL default '0',
>> > sid int(9) NOT NULL default '0',
>> > uid int(9) NOT NULL default '0',
>> > rating tinyint(1) NOT NULL default '
x27;,
> > uid int(9) NOT NULL default '0',
> > rating tinyint(1) NOT NULL default '0',
> > UNIQUE KEY csu1 (cid,sid,uid),
> > KEY cid1 (sid),
> > KEY sid1 (sid),
> > KEY uid1 (sid),
> > } TYPE=InnoDB;
> &g
0',
> uid int(9) NOT NULL default '0',
> rating tinyint(1) NOT NULL default '0',
> UNIQUE KEY csu1 (cid,sid,uid),
> KEY cid1 (sid),
> KEY sid1 (sid),
> KEY uid1 (sid),
> } TYPE=InnoDB;
>
>
> I am using a R
ult '0',
UNIQUE KEY csu1 (cid,sid,uid),
KEY cid1 (sid),
KEY sid1 (sid),
KEY uid1 (sid),
} TYPE=InnoDB;
I am using a REPLACE query to insert a row if it doesn't exist and
replace an existing row if one does exist:
REPLACE into TEST (cid, sid, uid, rating)
Worked like a dream Dan
Thanks Paul for being patient :)
Thank you
Andrew
>-Original Message-
>From: Dan Greene [mailto:[EMAIL PROTECTED]
>Sent: 17 November 2003 21:27
>To: [EMAIL PROTECTED]; Mikael Fridh; MySQL-Lista
>Subject: RE: replace query + RTFM?
>
>
>you
On Monday 17 November 2003 01:18 pm, Andrew wrote:
> Can someone kindly tell me what I doing wrong and help with this query?
>
> I want to replace / update the text for every record within table items
> field ItemDescription. This is what I have so far and its isn't corroect :(
>
> UPDATE items SET
[EMAIL PROTECTED]
> Sent: Monday, November 17, 2003 4:19 PM
> To: [EMAIL PROTECTED]; Mikael Fridh; MySQL-Lista
> Subject: RE: replace query + RTFM?
>
>
>
>
> Can someone kindly tell me what I doing wrong and help with
> this query?
>
> I want to replace / update the te
Can someone kindly tell me what I doing wrong and help with this query?
I want to replace / update the text for every record within table items field
ItemDescription. This is what I have so far and its isn't corroect :(
UPDATE items SET ItemDescription='A-Z Business Directory Please
call 0870
>Looks to me like you want to use UPDATE instead. Specify a WHERE clause
>that identifies the rows you want to update, and in the SET clause specify
>the new value for the description column.
>
>To pre-flight your UPDATE, you can write a SELECT that has the same WHERE
>clause. This will show you
3 18:31
To: [EMAIL PROTECTED]; MySQL-Lista; Rodolphe Toots
Subject: RE: replace query + RTFM?
Andrew,
Please allow a small amount of grief to come from these lists...
People are usually glad to help, and Mike sent the info that he knew
to you. There is a certain amount of frustration that develops w
ta; Rodolphe Toots
>Subject: RE: replace query + RTFM?
>
>
>Andrew,
>
>Please allow a small amount of grief to come from these lists...
>People are usually glad to help, and Mike sent the info that he knew
>to you. There is a certain amount of frustration that develops when
>
box]
Dan Greene
> -Original Message-
> From: Andrew [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 17, 2003 1:16 PM
> To: MySQL-Lista; Rodolphe Toots
> Subject: RE: replace query + RTFM?
>
>
> amazing, and you guys are errr intelligent!!! can't actually
&g
[EMAIL PROTECTED]
>Subject: SV: replace query + RTFM?
>
>
>RTFM = "read the fucking manual"..
>
>-Ursprungligt meddelande-
>Från: Andrew [mailto:[EMAIL PROTECTED]
>Skickat: den 17 november 2003 18:55
>Till: Mikael Fridh; [EMAIL PROTECTED]; MySQL-Lista
>
ge-
>From: Mikael Fridh [mailto:[EMAIL PROTECTED]
>Sent: 17 November 2003 17:12
>To: [EMAIL PROTECTED]; MySQL-Lista
>Subject: Re: replace query
>
>
>On Monday 17 November 2003 18.04, Andrew wrote:
>> I have a MySQL database with records in a table that i would like to
On Monday 17 November 2003 18.04, Andrew wrote:
> I have a MySQL database with records in a table that i would like to
> replace. The table is
>
> items and the field is description. I would like to replace the existing
> text within this filed with some new text.
>
> I did this before and it was
I have a MySQL database with records in a table that i would like to replace.
The table is
items and the field is description. I would like to replace the existing text
within this filed with some new text.
I did this before and it was successful but I have lost the query to do it :(
Could som
speters,
Thursday, September 19, 2002, 10:55:41 PM, you wrote:
samdc> If i use a replace query, and there isn't an error, then either
samdc> a new row was inserted, or an existing row was updated.
samdc> The primary key in the table i'm replacing to is defined as
samdc&
If i use a replace query, and there isn't an error, then either
a new row was inserted, or an existing row was updated.
The primary key in the table i'm replacing to is defined as
mprid int not null auto_increment primary key
whether an insert or update actually occurs, i want to get
e.g yes we
> support this)
> I tried to do it with the replace query but being a newbie to mysql i
> couldnt find the right syntax.
> Can someone help.
>
> thanx and regards
> anil
This may help you
http://www.mysql.com/doc/S/t/String_functions.html
UPDATE table SET column
On 10 Jul 2002, at 12:13, Anil Garg wrote:
> One column (name answer)has a string ("ok --") in all the rows.(e.g
> "ok -- yes we support this."). now i want to remove all these 'ok --'
> in this column..leaving(e.g yes we support this) I tried to do it with
On Wednesday, 10. July 2002 18:13, Anil Garg wrote:
Hi!
> I tried to do it with the replace query but being a newbie to mysql i
> couldnt find the right syntax.
> Can someone help.
>
http://www.mysql.com/doc/U/P/UPDATE.html
Re
Hi,
i have a table with 2000 rows.
One column (name answer)has a string ("ok --") in all the rows.(e.g "ok --
yes we support this.").
now i want to remove all these 'ok --' in this column..leaving(e.g yes we
support this)
I tried to do it with the replace query
22 matches
Mail list logo