Hi all.
I have question about how the function quote() works with
NULL values. Here is what the mysql manual say:
---
QUOTE(str)
Quotes a string to produce a result that can be used as a
properly escaped data value in an SQL statement. The string
is returned surrounded by single quotes and with
t;, file);
}
if (cell->event_set) {
fputs("wait is ending\n", file);
}
}
- Original Message -
From: "Toro Hill" <[EMAIL PROTECTED]>
Newsgroups: mailing.database.myodbc
Sent: Tuesday, September 07, 2004 8:46 AM
Subject: innod
Hello all.
We're having a few problems with mysql, innodb seems to be stalling and
then causing a restarts at random times. I've looked through some of the
old posts and seen stuff similar to this with causes ranging from
incorrect memory setting to kernel problems.
So I was hoping that someone
Hi everyone. I seem to be getting some funny results when I combine the
IFNULL and QUOTE functions. Maybe I have overlooked something I can't
see what.
Anyway here's the situation.
SELECT version();
4.0.18-max-debug-log
The query I'm having problems with is as follows:
SELECT attachment,
QUOTE(a
This will only be a problem if the two inserts are using the same mysql connection/link_indentifier.
This isn't usually the case in a web environment, unless you are using a persistent mysql connection across multiple instances of the same script.
mysql_insert_id() returns the last insert id for
, which is what it should
do.
INSERT INTOPRODUCT(category, id, price) VALUES(1, 1, 0.1 );
INSERT INTOCUSTOMER(id) VALUES (2);
INSERT INTOPRODUCT_ORDER(customer_id) VALUES(1);
I hope this helps.
Toro
>
>
> -Ursprüngliche Nachricht-
> Von: Toro
I believe that your ON UPDATE CASCADE clause should be in the definition for the
PRODUCT and
CUSTOMER table rather than the PRODUCT_ORDER table.
However, I don't think that it will work how you expect.
ON UPDATE CASCADE means that everytime you update a row in this table then all rows in
other
Just use
SET FOREIGN_KEY_CHECKS=0
To turn off all foreign key contraints before you import the data.
Then use
SET FOREIGN_KEY_CHECKS=1
to turn them back on.
Go to http://www.innodb.com/ibman.html and search for foreign_key_checks for the docs.
Hope this helps.
Toro
> On 01/09/2003 at 1:01 Chris