MySQL Forums
Forum List  »  MyISAM

Re: Query failed:
Posted by: mendy mngwaba
Date: September 08, 2005 06:04AM

Here is the code and the error says, Query Failed
PLZ Helllllp

<?
if(isset($_POST['upload']))
{
$fileName = $_FILES['userfile']['name'];
$tmpName = $_FILES['userfile']['tmp_name'];
$fileSize = $_FILES['userfile']['size'];
$fileType = $_FILES['userfile']['content'];

$fp = fopen($tmpName, 'r');
$content = fread($fp, $fileSize);
$content = addslashes($content);
fclose($fp);

if(!get_magic_quotes_gpc())
{
$fileName = addslashes($fileName);
}


include 'library/config.php';
include 'library/opendb.php';

$query = "INSERT INTO files ('name, size, type, content') ".
"VALUES ('$fileName', '$fileSize', '$fileType', '$content')";

mysqli_query($mysqli, $query) or die('Error, query failed');
include 'library/closedb.php';

echo "<br>File $fileName uploaded<br>";
}
?>

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Query failed:
10163
September 08, 2005 06:04AM
3516
September 08, 2005 07:16AM
3097
September 09, 2005 06:10AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.