Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help needed with SQL & like% syntax... 1

Status
Not open for further replies.

TonyU

Technical User
Feb 14, 2001
1,317
US
[tt]
Hey guys, I'm trying to display a link only if the cookie matches the database field but I'm having problems with syntax because the field in the database is like:

Robert Jones
Steve Casey
Ronald Rhine
etc...

Here's how I thought it was done but nope:

if request.cookies("firstname") = views("researvedby") & request.cookies("last") = views("resevedby") then
response.write = response.write &quot;<a href=&quot;&quot;editrecords.asp?id=&quot; & views(&quot;id&quot;) & &quot;&quot;&quot;>Edit Record</a>&quot;&quot;&quot;


of course views(&quot;reservedby&quot;) being my recordset and field name.

[tt]
&quot;The only ideas that will work for you are the ones you put to work.&quot;
[/tt]

banana.gif
rockband.gif
banana.gif

 

That's suppossed to only be one response.write not two.(my typo)

response.write = response.write &quot;<a href=&quot;&quot;editrecords.asp?id=&quot; & views(&quot;id&quot;) & &quot;&quot;&quot;>Edit Record</a>&quot;&quot;&quot;

[tt]
&quot;The only ideas that will work for you are the ones you put to work.&quot;
[/tt]

banana.gif
rockband.gif
banana.gif

 
if request.cookies(&quot;firstname&quot;) = views(&quot;reservedby&quot;) and uest.cookies(&quot;last&quot;) = views(&quot;reservedby&quot;) then
Saturday 12.00
im6.gif
im2.gif
im2.gif
20.00
im5.gif
im4.gif
im7.gif
3.00am
im8.gif
Sunday [img http
 
No go GaryC123, I just logged in as someone else but I could still see the Edit Record Link

Shouldn't the syntax have a LIKE in it somewhere?
[tt]
&quot;The only ideas that will work for you are the ones you put to work.&quot;
[/tt]

banana.gif
rockband.gif
banana.gif

 
NEVER MIND! GaryC123

My dumb A$$ had misspelled reservedby, Sorry dude and thanks again
[tt]
&quot;The only ideas that will work for you are the ones you put to work.&quot;
[/tt]

banana.gif
rockband.gif
banana.gif

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top