[thelist] SQL syntax error
Joshua Hmielowski
jhmielowski at comcast.net
Mon Oct 13 10:59:23 CDT 2003
I am trying to upload information to a database and I keep receiving an
error in line one.
The page loads fine on the first try, and an echo statement gives me an
output of one.
so it seems to be hitting the database where it is.
however the error I get is upon clicking submit on the form.
----You have an error in your SQL syntax near '' at line 1 ---
Line one is my connections link:
require_once('Connections/productbase.php');
I cannot find anything wrong with this. All spelling and paths are
correct.
productbase.php is as follows:
And this is what I would assume could be the problem considering when I
receive the err message.
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_productbase = "localhost";
$database_productbase = "######"; '#' is where name. username , and
password are stored.
$username_productbase = "#####";
$password_productbase = "#######";
$productbase = mysql_pconnect($hostname_productbase,
$username_productbase, $password_productbase) or die(mysql_error());
?>
And I upload using these statements:
mysql_select_db($database_productbase, $productbase);
$Result1 = mysql_query($insertSQL, $productbase) or
die(mysql_error());
All insert code not shown here.
Any clues as to why I might be getting an error on line one after
submitting?
thanx in advance,
Josh
More information about the thelist
mailing list