[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [sql] in [set]?
****** message to minivend-users from Nicholas Albright <albrnick@bobcat.ent.ohiou.edu> ******
Just a follow up as someone mentioned that I didn't give enough details.
(Sorry about that!)
I have a form, and I want to process the data off of it. So I have
defined a subroutine, and based on certain tests, I'd like to be able to
insert data into my database. Here is an example:
-----Begin Example-----
<FORM METHOD=POST ACTION="[process-target]">
<INPUT TYPE=hidden NAME=mv_subroutine VALUE="bm">
<INPUT TYPE=hidden NAME=mv_arg0 VALUE=internal_code>
Internal Code: <INPUT TYPE=TEXT NAME="internal_code" SIZE=10
VALUE="[value internal_code]"> <BR>
<INPUT TYPE=submit VALUE="Insert record">
</FORM>
[set bm]
my($code) = @_;
if (defined($code) && (length($code) > 0) && ($code > 1024)) {
[sql set] insert into test value($code) [/sql]
return "Inserted";
}
else {
return "Missing";
}
[/set]
-----End Example-----
Please note that I'm not certain if the [sql][/sql] tags are right, as I
just put them in there of the top of my head/can't easily reference what I
had in there before. But Hopefully you will get the idea.
Thanks for your time,
-Nick
"The most exciting phrase to hear in science, the one that heralds new
discoveries, is not 'Eureka' (I found it!) but 'That's funny...' "
-- Isaac Asimov
On Tue, 23 Mar 1999, Nicholas Albright wrote:
> ****** message to minivend-users from Nicholas Albright <albrnick@bobcat.ent.ohiou.edu> ******
>
>
> Hello!
>
> I'm trying to use an [sql] tag within a [set] tag, but with no real
> success. Is it possible to do this?
>
> Example:
>
> [set test]
> [sql set]
>
> ....
>
> [/sql]
> [/set]
>
> Thanks for your time,
> -Nick
>
>
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list