Question
Inser then query
I am doing an insert then trying to put the id of that query
into a COOKIE.
I am getting an "Element APP_ID is undefined in Q_APP_ID" error from this code.
<cfquery name="q_enter_app_info" datasource="xxxxxxxx" username="xxxxxxxx" password="xxxxxxxx">
INSERT INTO `app_information`
(`app_id`, `app_first`, `app_last`, `app_dob`, `app_address`, `app_city`, `app_state`, `app_zip`, `app_phone`, `app_email`, `app_member`, `app_date`)
VALUES
(NULL, '#first#', '#last#','#DateFormat(dob, "yyyy-mm-dd")#', '#address#', '#city#', '#state#', '#zip#', '#phone#', '#email#', '#member#', '#DateFormat(date, "yyyy-mm-dd")#')
</cfquery>
<cfquery name="q_app_id" datasource="xxxxxxxx" username="xxxxxxxx" password="xxxxxxxx">
SELECT *
FROM app_information
WHERE app_phone = #phone#
</cfquery>
<cfcookie name="app_id" value="#q_app_id.app_id#">
Can someone knows how to make this code work or can show me an easier way to do it.
I am getting an "Element APP_ID is undefined in Q_APP_ID" error from this code.
<cfquery name="q_enter_app_info" datasource="xxxxxxxx" username="xxxxxxxx" password="xxxxxxxx">
INSERT INTO `app_information`
(`app_id`, `app_first`, `app_last`, `app_dob`, `app_address`, `app_city`, `app_state`, `app_zip`, `app_phone`, `app_email`, `app_member`, `app_date`)
VALUES
(NULL, '#first#', '#last#','#DateFormat(dob, "yyyy-mm-dd")#', '#address#', '#city#', '#state#', '#zip#', '#phone#', '#email#', '#member#', '#DateFormat(date, "yyyy-mm-dd")#')
</cfquery>
<cfquery name="q_app_id" datasource="xxxxxxxx" username="xxxxxxxx" password="xxxxxxxx">
SELECT *
FROM app_information
WHERE app_phone = #phone#
</cfquery>
<cfcookie name="app_id" value="#q_app_id.app_id#">
Can someone knows how to make this code work or can show me an easier way to do it.
