hello
for mysql_create_db() use mysql_query() and give an
SQL Statement ("CREATE DATABASE XYZ") as an argument.
the same for mysql_drop_db ("DROP DATABASE").
for mysql_connect: use mysql_real_connect.
the same is valid if you are using the Ruby MySQL
Modul. but it is very easy to extend the Ruby MySQL
class with a create_db function
require "mysql"
class Mysql
def create_db(db)
query("CREATE DATABASE #{db}")
end
end
see
http://www.rubywizard.net/ruby-mysql.html
the Ruby API is similar to the C Api, but developmet
time is faster. so if you do not have to use C maybe
you should consider Ruby. there is also Ruby/DBI
ruby-dbi.sf.net
Markus
--
- Miguel Cardenas <[EMAIL PROTECTED]> schrieb: >
Hello again...
>
> I opened mysql.h and found this...
>
> ---------------------------
> #ifdef USE_OLD_FUNCTIONS
> MYSQL * STDCALL mysql_connect(MYSQL *mysql, const
> char *host,
> const char *user, const char *passwd);
> int STDCALL mysql_create_db(MYSQL *mysql, const
> char *DB);
> int STDCALL mysql_drop_db(MYSQL *mysql, const char
> *DB);
> #define mysql_reload(mysql)
> mysql_refresh((mysql),REFRESH_GRANT)
> #endif
> ---------------------------
>
> why "old functions"? should I use new ones instead?
> I #define'd
> USE_OLD_FUNCTIONS before #include'ing mysql.h and
> now compiles fine, but I
> think it is not the best way...
>
> any comments or suggestions?
>
> thnx!
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
>
http://lists.mysql.com/[EMAIL PROTECTED]
>
__________________________________________________________________
Gesendet von Yahoo! Mail - http://mail.yahoo.de
Logos und Klingelt�ne f�rs Handy bei http://sms.yahoo.de
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]