I get a "Query failed" error on this:
What could hapent?
I login as <root> with MySQL-Front and pass the same query with no problem.
Query's length is about 500 bytes.
I need it to send my data to a remote MySQL server.

PS I send this here becouse is more related to MySQL than to php.

Thanks a lot

Makis


<?php
$link=mysql_pconnect("localhost","root","" );
mysql_select_db("test")  or die("Could not select database");
$fd = fopen ("c:\\tp5\\hotels.sql", "r");
$i=0;
while (!feof ($fd)) {
    $buffer = fgets($fd, 1024);
    $i=$i+1;
    print $buffer;    
         
$l=strlen($buffer);
if ($l>0) 
{
$result=mysql_query($buffer);
if ($result==0) echo(" Query failed, line $i , length $l <BR>");
}
}
fclose ($fd);
?>

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to