MySQL online connection

Codes here !

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 67
Joined: Tue Jul 09, 2002 8:45 am
Location: East Coast, USA

Thu Jul 11, 2002 5:33 pm

I cant provide that much help because you really didnt explain the problem. Basically, once you get the connection, you select your database, run a query against it, and use mysql_fetch_array or similar function to obtain the results. Here is a good place to start with the basics: and of course, the PHP site: Best of luck with those. If you have any other problems, try showing some example code or being more specific, and I would be more than willing to attempt to help.


User avatar
Posts: 1240
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol

Thu Jul 11, 2002 10:57 pm

RTFM my dear friend RTFM :wink:
"Sex,Drugs and Rock&Roll " replaced at "Sucks,Bugs and Plug&Play";

Oleg Butuzov
Last Samuray
Last Samuray
Posts: 824
Joined: Sun Jun 02, 2002 3:09 am

Fri Jul 12, 2002 7:43 am

Dear James,
How said my friend Wizard, RTFM!

It is very nice that you want to learn PHP and MySQL. I hope my links will help you... here you can find online documentaion, but you can download all documentation in one file (Soory but I forgot a link to the file) documentation... - APache web server...

If you are allredy called on this sites and dowloaded documentation. please rad its.

For reaply on your question...
It is just simple code? for your learning...

Code: Select all



$link=mysql_connect($host, $user, $pass);

mysql_select_db($dbname, $link);

$query=mysql_query("SELECT * FROM `table`", $link);
for ($i=0; $i<mysql_num_rows($query); $i++)



Thu Aug 01, 2002 4:02 pm

Pejone: Not meaning to be picky, I thought perhaps this would be a more suitable alternative to your loop as it's neater and more efficient

Code: Select all

$query = mysql_query("SELECT * FROM `table`", $link);
while ($data = mysql_fetch_array($query)) print $data['somes'];

It's essentially the same code, just smaller and neater. :D

Post Reply