You are here: Re: Is this a bug ? « All PHP « IT news, forums, messages
Re: Is this a bug ?

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация