Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
weswhite7 #1
Why won't this delete???
My problem is that this code was previously used, but it does not work now. I
think it may be because I have so many url variables. Any ideas? It's just
supposed to delete the record thats output in that row based on the id.
<cfif isdefined("url.action") and isdefined("url.season") and
isdefined("url.page") and isdefined("url.id")>
<cfset display = "1">
<cfif url.action eq "<cfoutput>#userid#</cfoutput>" and url.season eq
"<cfoutput>#season#</cfoutput>" and url.page eq "del" and isdefined("url.id")>
<cfquery name="delete" username="sla" password="slaera" datasource="sla">
delete FROM login_adm WHERE id = '#url.id#'
</cfquery>
<script>
window.location="yahoo.com";
</script>
</cfif>
</cfif>
<table width="100%" border="1" cellpadding="2" cellspacing="2">
<tr>
<td colspan="5" class="leaguename">Sub-Admin Login Modifications </td>
</tr>
<tr class="coolblue">
<td width="26%"><div align="center">Personal Name </div></td>
<td width="26%"><div align="center">Username</div></td>
<td width="26%"><div align="center">Password</div></td>
<td width="10%"><div align="center">Edit</div></td>
<td width="10%"><div align="center">Delete</div></td>
</tr>
<cfoutput query="checklogin">
<tr class="maintext">
<td width="26%"><div align="center">#name#</div></td>
<td width="26%"><div align="center">#login#</div></td>
<td width="26%"><div align="center">#login_passwd#</div></td>
<td width="10%"><div align="center"><a
href="sub-admin-add.cfm?action=#url.action#&season=#url.season#&ed itid=#login_id
#">[Edit]</a></div></td>
<td width="10%"><div align="center"><a
href="sub-admin.cfm?action=#url.action#&season=#url.season#& page=del&id=#login_i
d#">[Delete]</a></div></td>
</tr>
</cfoutput>
weswhite7 Guest
-
delete FLV again
:confused; Hello all, I'm having a trouble of calling the server side to delete the selected file from a list box. here is what I have on the... -
Delete form - Post data to a table and delete uponsubmit.
I have a delete form that I'd like to post the data to a table (delete_pcn) and delete upon submit, so that all deletions may be kept track of in... -
Delete button to delete 3D model
Hi all I'm new to director and I'm doing a 3D room planner project. For this application user can design their room virtually with 3D models of... -
Delete key doesn't delete when datagrid is bound to a disconnected table
(Re: WinForm Datagrid) I manually built a table instead of filling it from a datasource. I bound my datagrid to the table. The datagrid works great.... -
How to delete a LUN?
On Mon, 18 Aug 2003 14:00:59 -0700, Gerardo Colón wrote: You need to go into the Specialist and unassign the LUN from the target HBA(s). You... -
Fernis #2
Re: Why won't this delete???
You must not use <cfoutput> in situations like this. And you shouldn't use #
signs either, since you're not trying to _output_ anything. If your #userid#
was "7" for example, you're comparing if url.action equals
"<cfoutput>7</cfoutput>", not "7".
Change
<cfif url.action eq "<cfoutput>#userid#</cfoutput>" and url.season eq
"<cfoutput>#season#</cfoutput>" and url.page eq "del" and isdefined("url.id")>
to:
<cfif url.action EQ userid AND url.season EQ season AND url.page EQ "del" AND
isDefined("url.id")>
(just capitalized operators for clarity)
You're not trying to _output_ anything on the screen. So do not use <cfoutput>
or #'s, because you don't need them.
Fernis Guest
-



Reply With Quote

