View Single Post
Old 09-09-2004, 06:01 AM   #2 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,705
redhead is on a distinguished road
Re: Help neded with SQL please

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.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is online now   Reply With Quote