Created
September 19, 2008 14:58
-
-
Save omo/11600 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* send_query */ | |
static VALUE send_query(VALUE obj, VALUE sql) | |
{ | |
MYSQL* m = GetHandler(obj); | |
Check_Type(sql, T_STRING); | |
if (GetMysqlStruct(obj)->connection == Qfalse) { | |
rb_raise(eMysql, "query: not connected"); | |
} | |
if (mysql_send_query(m, RSTRING_PTR(sql), RSTRING_LEN(sql)) != 0) | |
mysql_raise(m); | |
return Qnil; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment