think tank forum

technology » complete sql query in get request

lucas's avatar
17 years ago
link
lucas
i ❤ demo
hilarious: http://forum.mootools.net/viewtopic.php?id=1777

Perhaps I'm doing something wrong, but why does the following work:

var myXHR = new XHR({method: 'get'}).send('sql.php?sql=SELECT * FROM INFORMATION_SCHEMA.SCHEMATA');


Yet this doesn't?

var myXHR = new XHR({method: 'get'}).send('sql.php','sql=SELECT * FROM INFORMATION_SCHEMA.SCHEMATA');


And by doesn't, I mean that $_GET['sql'] is unset.



God spectre, i hope you know what you are doing 'cose passing plain sql commands as php query could be really dangerous...



I really want your sql-in-xhr-request in my daily wtf ;)

lucas's avatar
17 years ago
link
lucas
i ❤ demo
p.s. nesting pre tags in blockquotes is fun!
sriehl's avatar
17 years ago
link
sriehl
surreal
LOL
lucas's avatar
17 years ago
link
lucas
i ❤ demo
actually i was talking to dp last night about a sql feature for ttf. make an ajax feature that allows you to enter in your own sql queries to get data from the ttf database. it would only have SELECT permissions, but this could be useful for people like dp who may want to rip all of their information from the database.
sriehl's avatar
17 years ago
link
sriehl
surreal
so you'd be able to do a select of all the tables? I'd be hesitant about that.
lucas's avatar
17 years ago
link
lucas
i ❤ demo
haha :D

dude my server has tons of unused resources

i fully support 5 second queries