I took the liberty to move this to PHP section, which I think is more apropriate.
Quote:
Originally posted by EdB Hi,
I have inherited some code that does not work, but I am no SQL programmer. Please could someone help me? Code: <?php require_once('Connections/connect.php'); ?> |
This is your line 1, which means it is in the
Connections/connect.php your error is.
Quote:
Originally posted by EdB
Ok, if I load this page I get:
You have an error in your SQL syntax near '' at line 1
If I remove this part of the code: Code: or die(mysql_error()); The page loads, it does not work as it supposed to but at least I get something on the page. Can someone explain to me please what this code is doing? |
Ths line you're talking about isn't even shown in your code segment, it most likely is presented in your
Connections/connect.php since you're not showing that, it is very difficult to track down where it fails..
Most likely you're trying a connect call, which fails and the
die() is miss placed, so when you remove it you omit the troubled segment of your code, but without your connect script it isn't easy to tell.