From: Eric Bergen Date: December 6 2004 10:36pm Subject: Re: Newbie, MySQL test fails, spent hours, please help List-Archive: http://lists.mysql.com/mysql/176945 Message-Id: <11b1bd9904120614365a336fe8@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Aaron, You aren't trapping errors on mysql_connect(). Try this: mysql_connect($host,$user,$password) or die(mysql_error()); -Eric On Mon, 6 Dec 2004 19:13:49 +0100, Aaron Ford wrote: > Hey. > > The code that I'm trying to get to work is as follows. The problem is > with the 7th, 8th, and 9th lines... > > > > Test MySQL > > > $host=""; > $user=""; > $password=" "; > > mysql_connect($host,$user,$password); > $sql="show status"; > $result = mysql_query($sql); > if ($result == 0) > echo("Error " . mysql_errno() . ": " . mysql_error() . ""); > elseif (mysql_num_rows($result) == 0) > echo("Query executed successfully!"); > else > { > ?> > > > > for ($i = 0; $i < mysql_num_rows($result); $i++) { > echo(""); > $row_array = mysql_fetch_row($result); > for ($j = 0; $j < mysql_num_fields($result); $j++) { > echo(""); > } > echo(""); > } > ?> >
Variable_nameValue
" . $row_array[$j] . "
> > > > > The server that I'm uploading to is www.allbutnothing.com. I know my > computer name, is the correct form for the host value > computername.webserver.com?? How do I find my username and password, > the only one I entered was the one when MySQLadmin.exe installed... is > that the username and password that should be used? > > Thanks very much. > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/mysql?unsub=eric.bergen@stripped > > -- Eric Bergen eric.bergen@stripped http://www.bleated.com