Click to See Complete Forum and Search --> : MySQL + PHP


Anon
02-19-2001, 11:40 AM
I am running a local network using
omni-httpd server with php4 and mysql for windows. Each component works wonderfully by themselves. However, when I try to run a connection to the mysql database it returns and error that says the php_mysql.dll is not found. The inconsistant thing is that the code works! It finds my database and extracts the correct information from the fields, yet still returns an error. I tried error suppression set to (0) but that does not prevent the mysql error. Any help on this subject would be appreciated.

Anon
02-20-2001, 10:54 AM
maby your dll is in two places (one where it work and the other link its not finding anything). Do a search to see how many copys u have and then del the right one..... (same thing happend to my frined) . it's cause he messed up on the install of one or the other.

Anon
02-21-2001, 04:03 AM
I wanted to ask where it is the error, in importing file of text in db the MySql

Name DB: prova
Table: test -> row (id, colore, sapore)

--------------------Language PHP-----------
<?
$dbaddress="localhost";
$login="";
$password="";
$dbname="prova";

if(!($conn=mysql_connect($dbaddress,$login,$password)))
{echo"Connessione al server non riuscita";}

mysql_select_db($dbname,$conn);

$query=mysql_query("LOAD DATA LOCAL INFILE 'tabella2.txt' INTO TABLE test FIELDS TERMINATED BY ';' ENCLOSED BY '"' (id, colore, sapore)");
if(!($result=mysql_query($query,$conn)))
{echo"<center><b>Errore nella query di eliminazione</b></center>";}


// Chiusura connessione
mysql_close($conn);
?>
------------------------------------------

----------------File of text--------------
1;"giallo";"canarino"
2;"rosso";"fragola"
------------------------------------------

Thanks

aurigus
02-21-2001, 10:57 AM
I believe that MySQL support is built in to PHP4. I think that what is causing the problem is that the separate module is probably being loaded via php.ini whereever you have that located. If you remove that it should work OK.

Hope that helps!

-Dave

CLynch wrote:
-------------------------------
I am running a local network using
omni-httpd server with php4 and mysql for windows. Each component works wonderfully by themselves. However, when I try to run a connection to the mysql database it returns and error that says the php_mysql.dll is not found. The inconsistant thing is that the code works! It finds my database and extracts the correct information from the fields, yet still returns an error. I tried error suppression set to (0) but that does not prevent the mysql error. Any help on this subject would be appreciated.