Jump to content

Archived

This topic is now archived and is closed to further replies.

Cesario

Connection to MySQL server

Recommended Posts

HI guys, im new to PHP. Recently i have been assigned to do PHP stuffs. IM having problems with the connection to MYSQL server using ADOdb to connect.

My error is
Debug Error: adodb\drivers\adodb-mysql.inc.php line 354 - Call to undefined function mysql_connect()

Even though i have jus written jus a few sentence of codes.

<?php

require'adodb/adodb.inc.php';


$conn = &ADONewConnection('mysql');
$conn->connect('LOcalhost','rootx','cex','w2paylitex');

if(! $DB)
{
die("The problem was ");

}
else {
print "connected";

}

?>
Thankx

Share this post


Link to post
Share on other sites
Debug Error: adodb\drivers\adodb-mysql.inc.php line 354 - Call to undefined function mysql_connect()

A couple of quesitons:

1. Are you trying to connect to adodb? or to mysql?

2. The error you are getting typically means you are using a server with PHP but mysql has not been enabled... PHP 5 dropped native support, you have to enable it... and in 4 is can be disabled if you choose...

Share this post


Link to post
Share on other sites
[!--quoteo(post=357898:date=Mar 24 2006, 07:09 AM:name=AV1611)--][div class=\'quotetop\']QUOTE(AV1611 @ Mar 24 2006, 07:09 AM) [snapback]357898[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Debug Error: adodb\drivers\adodb-mysql.inc.php line 354 - Call to undefined function mysql_connect()

A couple of quesitons:

1. Are you trying to connect to adodb? or to mysql?

2. The error you are getting typically means you are using a server with PHP but mysql has not been enabled... PHP 5 dropped native support, you have to enable it... and in 4 is can be disabled if you choose...
[/quote]


how do i enable it. i was told to use adodb to actually get connected between PHP n MySQL.

Share this post


Link to post
Share on other sites
[!--quoteo(post=358013:date=Mar 24 2006, 07:05 PM:name=Cesario)--][div class=\'quotetop\']QUOTE(Cesario @ Mar 24 2006, 07:05 PM) [snapback]358013[/snapback][/div][div class=\'quotemain\'][!--quotec--]
how do i enable it. i was told to use adodb to actually get connected between PHP n MySQL.
[/quote]

adodb is a class that can be used to connect to a mysql database, but you need to do all of your work within that adodb class..

installing mySQL with php is very simple, and there's a guide at [a href=\"http://www.php.net\" target=\"_blank\"]http://www.php.net[/a] .. just search for 'mySQL' and select 'manual' in the dropdown.

GOOD LUCK

Share this post


Link to post
Share on other sites
[!--quoteo(post=358017:date=Mar 24 2006, 02:08 PM:name=keeB)--][div class=\'quotetop\']QUOTE(keeB @ Mar 24 2006, 02:08 PM) [snapback]358017[/snapback][/div][div class=\'quotemain\'][!--quotec--]
adodb is a class that can be used to connect to a mysql database, but you need to do all of your work within that adodb class..

installing mySQL with php is very simple, and there's a guide at [a href=\"http://www.php.net\" target=\"_blank\"]http://www.php.net[/a] .. just search for 'mySQL' and select 'manual' in the dropdown.

GOOD LUCK
[/quote]


but i got this error which point my sql connection
Debug Error: adodb\drivers\adodb-mysql.inc.php line 354 - Call to undefined function mysql_connect()

and when i check it out, its this.
if (ADODB_PHPVER >= 0x4300)
$this->_connectionID = mysql_connect($argHostname,$argUsername,$argPassword,
$this->forceNewConnect,$this->clientFlags);

i dont understand the forcenewconnect and clientflags, wad has these got to be related to me loggin into my database?

Share this post


Link to post
Share on other sites
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--] installing mySQL with php is very simple, and there's a guide at [a href=\"http://www.php.net\" target=\"_blank\"]http://www.php.net[/a] .. just search for 'mySQL' and select 'manual' in the dropdown.

GOOD LUCK[/quote]

Share this post


Link to post
Share on other sites
anywae, im more or less done wif it, jus dat i still cant get connected to the database and dunt even noe y. there error is still the same and i even read thru the links.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.