Re: Insert statement problem

2004-11-26 Thread Alec . Cawley
Stuart Felenstein <[EMAIL PROTECTED]> wrote on 26/11/2004 13:54:31: > I'm trying to build an insert query that will add a > value into a field , after the first insert query adds > the record. > > Relevant table information: > > +-+-++--+ > | RecordID

Re: Insert statement where value depends on auto-generated value from previous insert

2004-03-18 Thread Scott Plumlee
Found that function right after I posted. Thanks, it should do exactly what I need. Roger Baklund wrote: * Scott Plumlee I've got two separate tables, each with id fields that are auto-increment. The created fields below are timestamps. The tables are Innodb tables using transactions to proce

Re: Insert statement where value depends on auto-generated value from previous insert

2004-03-18 Thread Roger Baklund
* Scott Plumlee > I've got two separate tables, each with id fields that are > auto-increment. The created fields below are timestamps. The tables > are Innodb tables using transactions to process the statements. This > will be an online registration process for our business, using PHP and > MyS

Re: Insert statement where value depends on auto-generated value from previous insert

2004-03-18 Thread Scott Plumlee
Scott Plumlee wrote: I've looked through the PHP Cookbook and the MySQL cookbook and haven't seen a solution. I've thought about trying to make some unique hash with the data to be inserted but if there's another identical set of data, then the hash would match. I can't use a timestamp in the

Re: Insert statement with an ' in it

2003-06-28 Thread Alfredo J. Cole
El Sáb 28 Jun 2003 12:24, Zachary Perschall escribió: > Help! I'm trying to do an insert statement where one of the fields > sometimes contains an apostrophe. The field type is a varchar. Everytime > that one of these values comes up with an apostrophe, it tells me there is > an error in my SQL st

Re: Insert statement with an ' in it

2003-06-28 Thread Andrew Pierce
Well, the easiest thing is to "escape" any single quotes with a backslash character (\). PHP includes a function named addslashes() that does this. http://us4.php.net/manual/en/function.addslashes.php Same logic applies in other languages. Hope this helps. Andrew > Help! I'm trying to do an

Re: Insert statement with an ' in it

2003-06-28 Thread nospam
why don't you just insert your values after you escaped some special characters? specifically, you have to replace all ' by \' (prepend a single backslash character), and everything works fine! i guess you do your INSERTs from out of some programming language, like PHP, Perl or C. just use the

Re: insert statement new trouble

2001-10-30 Thread Paul DuBois
At 2:43 AM + 10/31/01, Curtis Gordon wrote: >I have a query where I am inserting a record into a db, and would >like to have the primary key >value returned, I have been reading and reading, but I can't seem to find >any mention of this. I would think that this would be useful. Can anybody >h

Re: insert statement

2001-10-27 Thread jim barchuk
Hi Curtis! On Sat, 27 Oct 2001, Curtis Gordon wrote: > omg! > code red!! > I JUST installed apache and mysql the other day because my host went down > and I didn't want to miss out on dev time! > Is is possible that the downloads i grabbed were already infected? I think you're fine. Those were

Re: insert statement

2001-10-27 Thread Curtis Gordon
omg! code red!! I JUST installed apache and mysql the other day because my host went down and I didn't want to miss out on dev time! Is is possible that the downloads i grabbed were already infected? _ Get your FREE download of MSN

Re: insert statement

2001-10-27 Thread Mike
That's W32.Nimda, I believe. Maybe Code Red. Every 10 minutes or so, you'll get 16 or so attempts shot to yer log. But yes, this has nothing to do with MySQL. Mike Curtis Gordon wrote: > hi Jim, I am finding a TON of errors like this one.. > > [Sat Oct 27 01:14:57 2001] [error] [client **.***