r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[MySQL]

Maxim
1-May-2007
[863]
cool ! :-)
Dockimbel
1-May-2007
[864]
I didn't made it before because I wanted to keep track of the download 
stats (usefull info to estimate the size and activity of the community), 
but it's no more necessary, the community seems to be stable since 
several years now.
Maxim
1-May-2007
[865]
I think many of us don't use rebol.org as much as we should.
Sunanda
1-May-2007
[866]
As a script owner on REBOL.org you have access to up-to-the-minute 
access and download stats.
Dockimbel
1-May-2007
[867x2]
I see that rebol.org has improved a lot. Good work guys!
Is there a top 10 most downloaded scripts ? (could be usefull to 
newcomers)
Sunanda
1-May-2007
[869]
There's a top 250 most popular scripts -- available if you are logged 
on:

http://www.rebol.org/cgi-bin/cgiwrap/rebol/script-popularity.r?top=250

The popularity rating is an imperfect attempt to factor out downloads 
by bots (and many other factors) and arrive at something meaningful.
Maxim
1-May-2007
[870]
wow glayout is in the top 10   :-)  I'm proud  :-)
Sunanda
1-May-2007
[871]
[maybe we should switch to Library -- we're off-topic for MySQL]
Dockimbel
1-May-2007
[872]
Can I upload a ZIP archive or does it require to upload only a single 
REBOL script ?
Sunanda
1-May-2007
[873]
{switching to Library to answer that]
Will
1-May-2007
[874]
great! Thanks Doc 8)
Dockimbel
1-May-2007
[875]
MySQL Driver for REBOL version 1.1.0 released.


    Changes : http://softinnov.org/rebol/mysql-usage.html#sect2.1.
    Download: http://rebol.softinnov.org/mysql/
TimW
4-May-2007
[876]
I really like the new preferred method.  Thanks for adding that.
Maarten
6-May-2007
[877x2]
Me too. Should we add /prevent-sql-injection with send/sql?
*send-sql
Dockimbel
6-May-2007
[879x2]
The prepared statements mode should protect from SQL injection : 
send-sql db [ "...?..." argument ]
I've hesitated between 'send-sql and 'do-sql. I've used 'do-sql for 
the Cheyenne/RSP database API, so the driver had 'send-sql.
Maarten
6-May-2007
[881]
even if 'argument is a SQL query in its own?
Dockimbel
6-May-2007
[882x4]
the query (string!) will be properly quoted and escaped, so it should 
do no harm.
for example :
argument: "SQL injection code"
send-sql db [ "SELECT * FROM table WHERE field like ?" argument ]

will produce 

 SELECT * FROM table WHERE field like 'SQL injection code' 
if 'argument itself, contains quotes, they will be escaped.
Maarten
6-May-2007
[886]
As always, smarter than I thought. And it is amazing what level of 
abstraction one can provide with so few lines of REBOL
Dockimbel
6-May-2007
[887]
You remind me that I should add a few lines about secure programming 
practices in the driver documentation.
Pekr
7-May-2007
[888x2]
Doc, I would try to apply to be listed here - http://www.mysql.com/products/connector/
note that there are also community drivers mentioned ...
Will
7-May-2007
[890x10]
now you can:
node: first send-sql/named db {select * from `node` where id=1 LIMIT 
0,1}
what about this?
node: db-get 'node [] {id=1}
and this:
db-get 'node [id name data] [{id=?} 1]
will send a query like:
{SELECT `id`,`name`,`data` FROM `node` WHERE id='1' LIMIT 0,1}
quoted columns.. 8)
column names
Will
13-May-2007
[900x4]
not sure but with latest mysql-driver
this works:
send-sql db ["INSERT INTO `engine` (`id`,`style`) VALUES 
('12',?)" "ciao;oo"]
will send {INSERT INTO `engine` (`id`,`style`) 
VALUES ('12','ciao;oo')}
this doesn't:
send-sql db "INSERT INTO `engine` (`id`,`style`) VALUES 
('12','ciao;oo')"
will send:
{INSERT INTO `engine` (`id`,`style`) 
VALUES ('12','ciao}
it worked before the new multiple statements feature
Dockimbel
13-May-2007
[904]
Interesting case, you're right, it may confuse the multistatement 
processing, I'll make a fix for that asap.
Will
13-May-2007
[905]
Thank you Dock!
Joe
19-May-2007
[906]
Hi Doc, When will you release the multi-statement fix ?
Dockimbel
20-May-2007
[907]
Hi Joe, I should have time tomorrow to make that fix.
Terry
22-May-2007
[908x2]
Am I missing something wihen querying multiple columns... seems I 
get the results as a single string.. 
ie: send-sql "select a, b from table";

returns something like     "aresultbresult" ?
nevermind
Dockimbel
22-May-2007
[910x2]
Beta release v1.1.1 with a fix for the semicolon issue in SQL strings 
: http://softinnov.org/tmp/mysql-protocol.r
Please let me know if there are still issues with multi-statements 
parsing.
Will
22-May-2007
[912]
Thank you Dock!