obtaining MySQL version: mysql_row_arr error [message #11710] |
Mon, 14 July 2003 21:46 |
morganw
Messages: 6 Registered: July 2003
Karma: 0
|
Junior Member |
|
|
http://fud.prohost.org/doc/d/html/installation.html#install.verify.config
says that to get MySQL version, use
<?php
mysql_connect("127.0.0.1", "USER_NAME", "PASSWORD");
$result = mysql_query("SELECT VERSION()");
list($mysql_version) = mysql_row_arr($result);
echo "MySQL Version: ".$mysql_version."<br>\n";
mysql_free_result($result);
?>
I just got next-to-latest stable PHP (4.3.1 'cause 4.3.2 download links were broken) & built it from source. It doesn't have a mysql_row_arr() function. Instead, I used this to get the version:
<?php
mysql_connect("127.0.0.1", "USER_NAME", "PASSWORD");
$ver_result = @mysql_query("SELECT Version() AS version");
$ver_row = @mysql_fetch_array($ver_result);
$mySQLversion = $ver_row["version"];
echo "MySQL Version: ".$mySQLversion."<br>\n";
mysql_free_result($ver_result);
?>
Which gave me this as output:
this is the body
PHP Version: 4.3.1
MySQL Version: 3.23.47-log
(I used the built-in MySQL. Install FUDForum next....)
|
|
|
Re: obtaining MySQL version: mysql_row_arr error [message #11716 is a reply to message #11710] |
Mon, 14 July 2003 23:25 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
This is a bug in the documentation, the correct function name is 'mysql_fetch_row'. As far as your configuration goes it should be sufficient to get FUDforum installed and running.
FUDforum Core Developer
|
|
|
|
|
|
|
|
Re: obtaining MySQL version: mysql_row_arr error [message #34657 is a reply to message #34634] |
Sun, 12 November 2006 16:19 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
That's documentation, not the FUDforum's source code. In newer versions you can just use the installer and it'll automatically check to see if you have the right version of MySQL or not.
FUDforum Core Developer
|
|
|
|
Re: obtaining MySQL version: mysql_row_arr error [message #34676 is a reply to message #34668] |
Tue, 14 November 2006 14:38 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
heh, well the general approach is to try to install and check the docs when things don't work. As a rule FUDforum installer works from the first try and very rarely do the people need to consult the documentation for extra information.
The issue you've pointed in the docs, has in fact been fixed in the doc cvs, however it'd be a while before the documentation is rebuilt and starts to reflect the correction.
FUDforum Core Developer
|
|
|
Re: obtaining MySQL version: mysql_row_arr error [message #34685 is a reply to message #34676] |
Tue, 14 November 2006 18:15 |
ebyrob
Messages: 5 Registered: November 2006
Karma: 0
|
Junior Member |
|
|
Ah. It all makes sense now. Thanks.
I guess I am a bit obsessive about reading docs. Of course, even I don't read the whole thing before getting started.
Hmm... The updated docs are in CVS. Whodathunkit? I could only dream of doing that in a work environment.
|
|
|