|
Posted by McHenry on 05/03/06 05:10
"robert" <ab@no.spam-alama-ding-dong> wrote in message
news:O9U5g.63$tD3.60@fe03.lga...
> 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.
I posted the new thread after I had received your reply asking for the
details sorry.
The example I posted was a trivial example which illustrates the scenario
however the real stored procedure is more complex.
I would prefer to keep the sql within a sp if possible.
p.s. Nice choice of city !!!
>
> ===========
>
> <?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]
|