EasyCFM.COM ColdFusion Forums / MS SQL Server Related Issues / a issue with mysql or my mistake

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: a issue with mysql or my mistake

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

specific
12-05-2008 @ 9:29 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 897
Joined: Apr 2006

Hi guys, I am trying to delete the user. my User gets deleted successfully.

my userid is realted to table2 which has refernce of userid.

I mean like i have 3 records and 2 records are related to userid 2.

now i delete userid 2, i want that also in should reflect that thinh in table 2.

I want it should update the table 2 userd value to null where userid was 2.

i am trying to do it in 2 queries but it is now working.

no err is tthrown,

first query make update using in operator (i think my query structure is wrong)

update userid
set userid  = null
where userid in ('form.userid')

then i make th delete query?

DELETE FROM users
        WHERE
        userid = <cfqueryparam cfsqltype="cf_sql_numeric" value="#trim(arguments.userid)#">

can u please tell me how this structure can be achieved.

well i am no good at procedures. if this can be done through procedures, can anybody tell how can it done..

Cheers

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Door to Coldfusion Community
Will Remain Open Till World Ends

Want a Web Portal Contact Me

randhawaz81@gmail.com

<cf_visitwebsite>

http://portal.randhawaworld.com/

</cf_visitwebsite>

weathermanfsu
01-16-2009 @ 12:44 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 183
Joined: Apr 2004

Looks like you posted this in the wrong forum - try the mysql forum.  You posted this in the MS SQL forum for SQL Server.


Website Designed and Developed by Pablo Varando.