Page 1 of 1

Help me use mysql_create_db in xampp 1.7.2

PostPosted: 23. December 2009 12:47
by warmoger
I am trying use the function mysql_create_db in xampp 1.7.2
What should I do?
And Why the function mysql_create_db deprecated?

Re: Help me use mysql_create_db in xampp 1.7.2

PostPosted: 23. December 2009 13:08
by Hanspeter Thöni
You shound use:
mysql_query("create database name....");

see here
http://ch.php.net/manual/en/function.mysql-create-db.php

Re: Help me use mysql_create_db in xampp 1.7.2

PostPosted: 23. December 2009 16:50
by warmoger
You shound use:
mysql_query("create database name....");
see here
http://ch.php.net/manual/en/function.my ... ate-db.php


Thanks very much...

But... I writed "I am trying"

I make question in this topic to ask somebody about how use the function mysql_create_db in xampp 1.7.2
Plz. Teach me. If u can.

Sorry about my english. It is bad.

Re: Help me use mysql_create_db in xampp 1.7.2

PostPosted: 23. December 2009 19:28
by Hanspeter Thöni
well, my english is not better...

Re: Help me use mysql_create_db in xampp 1.7.2

PostPosted: 23. December 2009 21:27
by Altrea
you can use this function like before, but now it throws a notice, that this function is deprecated (because the use of mysql_query() is the cleaner way, i think).

If you don't want to see deprecated notices, than you can configure the error reporting.
But wherever it is possible, you should use mysql_query()

Re: Help me use mysql_create_db in xampp 1.7.2

PostPosted: 23. December 2009 22:58
by warmoger
you can use this function like before, but now it throws a notice, that this function is deprecated (because the use of mysql_query() is the cleaner way, i think).

If you don't want to see deprecated notices, than you can configure the error reporting.
But wherever it is possible, you should use mysql_query()


Thanks!!!
I see that I should use the function mysql_query().
I got error "Call to undefined function mysql_create_db" when I used the function mysql_create_db().
After I used function_exists('mysql_create_db') and it return FALSE
I look in the manual of PHP and I see that this function is available in PHP 5. Mysql 5 too
So that... I want know... how can I use the mysql_create_db() in xampp 1.7.2?

Sorry about my english again. Plz! Help me.

Re: Help me use mysql_create_db in xampp 1.7.2

PostPosted: 23. December 2009 23:17
by Wiedmann
how can I use the mysql_create_db() in xampp 1.7.2?

There is no way to do this.
(this function is only available with a very old MySQL client library)

Re: Help me use mysql_create_db in xampp 1.7.2

PostPosted: 23. December 2009 23:29
by warmoger
There is no way to do this.
(this function is only available with a very old MySQL client library)


Thanks!!!