I don't now ich language you are using to perform this query.
But as mysql does not know any stored procedures, you will have to do it in
code with different call's.
the value of the id (seed in mssql) can be obtained with the SQL function
LAST_INSERT_ID()
a little hint. in your stored procedur
the easiest way is using a counter to 4 and then do reset to
so you get
if counter = 4 then
reset counter
write new line
endif
% calculates the modulo between $i and 2 = Remainder of $i divided by 2
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent:
select max(storyID), storyCategoryID
from newsStories where storyCategoryID > 0
group by storyCategoryID
- Original Message -
From: "Christopher Oson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 15, 2001 6:31 AM
Subject: Easy SQL query??
> Good Day, All,
>
>
The solution is fairly easy.
In you update statement you place something like this :
update table
set valuefield = newvalue
where keyfield = key
and valuefield = oldvalue
after the update you check affected rows.
if affected rows = 0 then it means that somebody else already changed the
valuefiel
rows
The rows column indicates the number of rows MySQL believes it must examine
to execute the query.
- Original Message -
From: "David Wolf" <[EMAIL PROTECTED]>
To: "Tore Van Grembergen" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday
maybe you heva to declare a compound index with userid and username.
the sql parser now does not use the index on username.
- Original Message -
From: "David Wolf" <[EMAIL PROTECTED]>
To: "Tore Van Grembergen" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]&g
do you have an index defined on users.username ?
- Original Message -
From: "David Wolf" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, October 28, 2001 4:26 PM
Subject: Optimizing query (2nd attempt)
> I have a query as follows:
>
> SELECT log.entity, log.action,
> LEFT(u
you could dump the data in an .sql file (mysqldump)
edit the .sql file to make the necessary changes
import the .sql file
- Original Message -
From: "McGrotty, Charles" <[EMAIL PROTECTED]>
To: "'Tore Van Grembergen'" <[EMAIL PROTECTED]>
Sent
The only table type at this moment that supports foreign keys is innodb.
it is distributed with mysql 4.0.
However you need to take the source files or the tar file to instal, the
rpm's have an older version of innodb.
On creation of the table you have to define your constraints (cf manual at
www
Hi,
if you want to enjoy the foreign keys from innodb in mysql 4 then you
can't use binaries from the rpm files.
The rpm files contain innodb .43, not .43b!
But the source 4.0.0 and the .tar.gz binary 4.0.0 (non-rpm)
contains .43b which supports foreign keys.
Kind regards
Tore
--
10 matches
Mail list logo