Reply to OT:ish Mysql question under PHP

Your name:

Reply:


Posted by elyob on 01/09/06 01:58

I posted this on a SQL newsgroup, but it seems absolutely dead.

What I'm trying to do is develop on multiple machines, sometimes connected
to the internet, sometimes not. I'd like to connect to a localhost if the
remote database is not available. What's the best way?

As a bit more info, I am using subversion for version control, develop under
XP and am on a Linux server. Hence the reason I am looking for a system
independent solution.

Here is a simple example/thought.

$link = mysql_connect('example.com:3307', 'mysql_user', 'mysql_password');

if (!$link) {
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
}


Thanks

[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

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