guys , i have one project (crossword )which uses mysql database! i want use mysql driver ,i know how we can create table and make connectivity with database ! crossword should show on web page ,and when user put characters in each field ,then press button ,it will chek with database and if it is correct ,user can continue otherwise shows error message ....i created crossword table with cgi and is working on web ,i have created database as well,now my problem is i do not know how can i fetch data and comparing with database? is there anybody for helping my mini project????
i need only simple example of that ...plz help me if you can ... i do not have time :( ...i am very begginer in rebol
Arnold
Show what you have got so far, may be you are close.
afsanehsamim
my understanding of work steps is : i have two files *.cgi and *.r ,in cgi file i created crossword that shows on web page ... in data.r i have made connectivity with database and create table ... and my codes are as following : in cgi file:
REBOL [] 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 probe results close db
the second file is only exaple of connectivity
table is differenet
Arnold
what did the probe results show?
afsanehsamim
in rebol interpreter only created table
i mean when i run data.r it creats table
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"] ]
Arnold
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>}
etc
afsanehsamim
and what extension should i use ? .r ???/
Arnold
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