Re: how to find out the mysql version from php?

From: Date: Tue, 10 Jul 2001 23:04:38 +0000
Subject: Re: how to find out the mysql version from php?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-57258@lists.php.net to get a copy of this message
or the more simple: mysql_get_server_info($dbh); // where $dbh is optional. http://www.php.net/manual/en/function.mysql-get-server-info.php Note: this is a new function for 4.0.5+. cheers, Aaron ----- Original Message ----- From: "Aaron Bennett" <abennett@liquidstudio.com> To: <php-general@lists.php.net>; "Jakob" <jakob@jfix.com> Sent: Tuesday, July 10, 2001 3:58 PM Subject: Re: [PHP] how to find out the mysql version from php? > Jakob, > See if this does what you're looking for. > > // returns a string with the current mySQL version connecting handled by > $dbh. > $mysqlver = pos(mysql_fetch_row(mysql_query("SELECT VERSION()",$dbh))); > > -- > Aaron > > ----- Original Message ----- > From: "Jakob" <jakob@jfix.com> > To: <php-general@lists.php.net> > Sent: Tuesday, July 10, 2001 2:56 PM > Subject: [PHP] how to find out the mysql version from php? > > > > > > several people seem the have the "case sensitivity problem" > > regarding different mysql versions - see this extract from > > the mysql manual: > > > > " > > Prior to MySQL Version 3.23.4, REGEXP is case sensitive, and the previous > query > > will return no rows. To match either lowercase or uppercase `b', use this > query > > instead: > > > > mysql> SELECT * FROM pet WHERE name REGEXP "^[bB]"; > > > > From MySQL 3.23.4 on, to force a REGEXP comparison to be case sensitive, > use > > the BINARY keyword to make one of the strings a binary string. This query > will > > match only lowercase `b' at the beginning of a name: > > > > mysql> SELECT * FROM pet WHERE name REGEXP BINARY "^b"; > > " > > > > is there a way to find out _programmatically_ which version of mysql is > running > > (phpinfo() gives some information, but i don't know how this can be > accessed) > > on the server. > > > > thanks in advance, > > Jakob. > > > > PS: please cc me, i am on the very long digest list. > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#57258) next »