Home > Archive > PHP SQL > June 2004 > SELECT SCOPE_IDENTITY() with PHP....ahhhhh!
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
SELECT SCOPE_IDENTITY() with PHP....ahhhhh!
|
|
| Rizyak 2004-06-24, 6:26 pm |
| This message is being cross posted to:
alt.comp.lang.php
alt.php.sql
microsoft.public.sqlserver.programming
I have two tables, bars & contacts. Using 1 form to input information about
both the bar and the contact I need to be sure that the contact_id for that
session is input in the appropriate bar_id. Seems easy enough...... I was
told to use SCOPE_IDENTITY, however, I can't seem to get any identity
besides null. I have emailed by host to see how to set up an identity
column, but have not heard from them yet. Right now bar_id and contact_id
are set as auto_increment fields.....
Can anyone help? The source is at sevennites.com/new/insert.html (view
source).
The form is at sevennites.com/new/add.php3
Thank you!
| |
| Aaron [SQL Server MVP] 2004-06-24, 6:26 pm |
| Could you show the SQL code you are actually using???
--
http://www.aspfaq.com/
(Reverse address to reply.)
"Rizyak" <ryan@latitude47.com> wrote in message
news:ca299t$s6m$1@nntp1.u.washington.edu...
> This message is being cross posted to:
>
> alt.comp.lang.php
> alt.php.sql
> microsoft.public.sqlserver.programming
>
>
> I have two tables, bars & contacts. Using 1 form to input information
about
> both the bar and the contact I need to be sure that the contact_id for
that
> session is input in the appropriate bar_id. Seems easy enough...... I was
> told to use SCOPE_IDENTITY, however, I can't seem to get any identity
> besides null. I have emailed by host to see how to set up an identity
> column, but have not heard from them yet. Right now bar_id and contact_id
> are set as auto_increment fields.....
>
> Can anyone help? The source is at sevennites.com/new/insert.html (view
> source).
> The form is at sevennites.com/new/add.php3
>
> Thank you!
>
>
|
|
|
|
|