I have a innodb with a join on two tables. The foreign key is the id
column which is set to AI. I have been having an issue of the tables being
out of sync in that the id is not the same on the two tables. I have
corrected this a couple of times in phpmyadmin by resetting the
auto_increment
which is set to AI. I have been having an issue of the tables being
out of sync in that the id is not the same on the two tables. I have
corrected this a couple of times in phpmyadmin by resetting the
auto_increment to the same number in both tables, but it is re-occurring.
I have tried
with a join on two tables. The foreign key is the id
column which is set to AI. I have been having an issue of the tables being
out of sync in that the id is not the same on the two tables. I have
corrected this a couple of times in phpmyadmin by resetting the
auto_increment to the same number in both
Am 15.04.2011 17:59, schrieb Gary:
Michael, thank you for your reply
Might I suggest, instead of the 2 part juggling act, you drop the
auto-increment property on your second table, and just use the value
derived from the first as the joining key in the second. Then there
is only one
The first thing I notice browsing your code is this block stuck
immediately between your 2 insert statements:
if ($_POST['address'] != '' ) {
die(Changed field);
}
This guarantees that your 2 auto_increment sequences will fall out of
sync any time any client POSTs (and perhaps all gets?)
Michael
I'm sorry, I should have removed this code for the post, but this code is
part of a honey pot. There is no 'address' input visible, it is used so
if a spam bot enters information into this field, it kills the form. Humans
cannot enter anything into this field.
if
Am 15.04.2011 18:34, schrieb Gary:
Michael
I'm sorry, I should have removed this code for the post, but this code is
part of a honey pot. There is no 'address' input visible, it is used so
if a spam bot enters information into this field, it kills the form. Humans
cannot enter
I'm sorry, I am unfamliar with an asc file, so I have not opened them.
GAry
Reindl Harald h.rei...@thelounge.net wrote in message
news:4da87554.8030...@thelounge.net...
__ Information from ESET Smart Security, version of virus signature
database 6044 (20110415) __
The
Am 15.04.2011 18:52, schrieb Gary:
I'm sorry, I am unfamliar with an asc file, so I have not opened them.
GAry
Reindl Harald h.rei...@thelounge.net wrote in message
news:4da87554.8030...@thelounge.net...
you should not open them
if your mail client would have gpg you would see a
- Original Message -
From: Gary gp...@paulgdesigns.com
I'm not sure I undertand this, could you explain a little further for
me.
This is what they're talking about:
http://dev.mysql.com/doc/refman/5.0/en/information-functions.html#function_last-insert-id
--
Bier met grenadyn
Is
Michael and Reindl
Thank you both for you help and patience. I have inserted the $id =
mysql_insert_id($connection) as well as the code in the INSERT clause and it
seems to be working fine.
One note is it turns out I did have AI on both tables, so that may have been
adding a monkey wrench.
11 matches
Mail list logo