You are here: Re: PHP 5.0 and MYSQL « All PHP « IT news, forums, messages
Re: PHP 5.0 and MYSQL

Posted by Good Man on 08/17/05 23:57

"Peter W Johnson" <vk3eka@bigpond.net.au> wrote in
news:TrgMe.91$FA3.53@news-server.bigpond.net.au:

> Sorry Michael,
>
> How about communicate between them!
>
> This is the code I am using:-
>
> <?php
> $dbcnx = mysql_connect("localhost", "user", "password");
> mysql_select_db("maintable");
> $result = mysql_query("SELECT * FROM test");
> while ($data = mysql_fetch_array($result)) {
> do something
> }
> ?>
>
> This works fine on my FC3 machine but not on the FC4 machine.

it sure must be hard to debug anything if you don't have any error
messages!

line 2 should be
@ $dbcnx = mysql_connect("localhost", "user", "password") or die ("There
is an error - ".mysql_error()."!");

ask what the error is! it will make fixing it a whole lot easier.

an early guess is that your current mysql setup is using the old mysql
password format while your new setup is expecting a new-style mysql
password.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация