Reply to Re: not a valid MySQL-Link resource

Your name:

Reply:


Posted by Kurda Yon on 04/27/07 11:53

It is me again. It seems that I solve the previous problem (with your
help) but get a new one (which seems to be very related to the
previous one).

This part of code produce a message about mistake:

$link = mysql_connect( "localhost","tmp_user","pswxxx" );
function fff()
{
$link_new = mysql_connect( "localhost","tmp_user","pswxxx", true );
mysql_close( $link_new );
}
fff();
mysql_select_db( "sss", $link );
$result = mysql_query( "select * from root" );

The message is:
Access denied for user: 'nobody@localhost' (Using password: NO)
A link to the server could not be established

It complains about the last line. And this message disappears if I do
not coll the function fff (I replace fff(); by //fff();).

Can anybody explain this behavior? It seems that connection made to
the database in the function somehow influences on other connection.

[Back to original 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

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