Gw Temp

Menu

Tutorial - 'Simpler Ways Of Mysql....' by Dragon_X

An item about Programming Languages posted on

Blurb

A short tutorial that covers up 'an easier' way to connect to multiple databases with MySQL.

Body

First off, This tut, will teach you how to make it easier to connect to different Databases on Different Pages.

First make a php page called, connections.php

then put this in


Function Connect_Forum()
{
mysql_connect("", "","");
mysql_select_db("???_forums");
}

Function Connect_News()
{
mysql_connect("","","");
mysql_select_db("???_news");

}

ok add as many more as you want....

then on any page just type either

Connect_Forum();

or

Connect_News();

or anything else, then just continue on doing your stuff

mysql_query("SELECT * FROM table WHERE id = ");

Well thats all, and i hope this helped, Cya,

Anyother php help just email me or contact me on forums


EMAIL: david_dr21@hotmail.com