AltME: Databases


i do not know how should i mix cgi file with database file
the results is like this:
do %data.r
Script: "Untitled" (none)
Script: "MySQL Protocol" (12-Jul-2008)
MySQL protocol loaded
connecting to: localhost
    ["raj" "pune"]
    ["ekta" "delhi"]
    ["ankur" "mumbai"]
you have to mix them something like  
#! "C:/wamp/bin/apache/Apache2.2.11/cgi-bin/rebol-core-278-3-1.exe" -cs
REBOL [Title: "Table"]
do %mysql-protocol.r
db: open mysql://root@localhost/test
insert db {create table data (
    name            varchar(100),
    address         text
insert db {INSERT into data VALUES
    ('raj', 'pune'),
    ('ekta', 'delhi'),
    ('ankur', 'mumbai')
insert db "SELECT * from data"
results: copy db
print "content-type: text/html^/"
print [<HTML><BODY><TABLE  bgcolor="black" border="1">
<tr bgcolor="white">
<td style="width:30px; height:30px;"><input name="one-one" type="text" size="1">}
print results/name
print {</td>}
and what extension should i use ? .r ???/
learning comes with a lot of try and err even for a 'simple' language as REBOL
Probably yes and have your apache server set up right for .r files
you're right,i configured  my apache server  for  cgi ... i think i should configure again
just rename it to .cgi
you have the correct shebang at the top. apache should recognize it automatically.
don't forget to chmod your cgi to grant execution permission.
but my OS is windows 7
i am not using linux
Then you don't have to chmod, you just have to put it in the right directory.

thank you Arnold.... i van fetch data from database :) ...i am working on compare two values (value that is entered by user and value that is correct )...
do you know for comparing which aommand should i use?
command for comparing values in mysql database ????
hey guys... do you know how  we can check values of two tables in mysql?????!!!!
select * from table where answer = useranswer
select * form table1, table2 where table1.field = table2.field
Do you have google? Any MySQL tutorial out there holds the answer to your question.
Or want to compare from wihin your REBOL script? It is either [ left = right][do-something][do-else-thing].
i exactly meant that how we can use Mysql queries(checking two values in two different table) in Rebol script !!!!!
so you have put the users answer also in a mySQL table?
read both tablerows from the tables into different variables and compare the subfields of the returned rows result1/fielda result2/fielda

if  user wants insert values to table and it should save in database ,what is the command for that ???
this command is correct ???  :  insert db ["insert into data1 values (?)" myfields name]

Last message posted 203 weeks ago.