ASP question... not MySQL (if I understand correctly...)

But just do a replace...



variabletoinsert = replace(thevariablecomingin,"'","\'")

INSERT INTO ASP (title, description, code, user, email, date_created) VALUES
('title', 'description', '" & variabletoinsert & "', 'user', 'email', 'now')



you could write a quick function that you could call at will...

function fq(string)
    fq = replace(string,"'","\'")
end function


mystr = "insert into asp (blah,blah,blah) values ('" & fq(inblah) & "','" &
fq(inbalh) & "','" & fq(inblah) & "')"
conn.execute mystr



----- Original Message -----
From: "Deryck Henson" <[EMAIL PROTECTED]>
To: "MySQL" <[EMAIL PROTECTED]>
Sent: Friday, September 07, 2001 10:10 PM
Subject: Re: Can some PLEASE tell me what this error means


> Except the problem is, this is done through an Active Server Page (ASP).
> The user does the inserting, I just use variables and insert them.
> TRANSLATION::  I have no control over what goes in the database until it's
> there.  So how can it be changed in the connection or sending process?
>
> - Deryck H
> - http://www.comp-u-exchange.com
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>
>



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to