|
Posted by robert on 05/03/06 05:01
it may have been good to keep this in your last post thread. i had asked in
that thread to see exactly what you've posted here. either way, it's good
for us to see. have you tried isolating the problem using simple examples
that have been known to work? this is a quick one that i've run and it
outputs as expected.
===========
<?php
$link = mysqli_connect("localhost", "my_user", "my_password", "world");
/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
mysqli_query($link, "CREATE TABLE myCity LIKE City");
$query = "INSERT INTO myCity VALUES (NULL, 'Stuttgart', 'DEU', 'Stuttgart',
617000)";
mysqli_query($link, $query);
printf ("New Record has id %d.\n", mysqli_insert_id($link));
/* drop table */
mysqli_query($link, "DROP TABLE myCity");
/* close connection */
mysqli_close($link);
?>
===========
the "myCity" table has to be made from scratch...but you could substitute it
w/ your own. what we're trying to do here is just get *something* to work.
once that happens, we can introduce new factors until it no longer works...i
suspect it may be with the binding.
i'm not sure if they name bugs after people...but you're welcome to it. ;^)
and, there have been several bugs in the past related to the insert_id. once
reported, they are fixed promptly. we just have to document where it breaks.
Navigation:
[Reply to this message]
|