Skip to main content
Inspiring
August 5, 2008
Answered

error code by CS3

  • August 5, 2008
  • 1 reply
  • 307 views
I have a problem when trying to find a set of dates within a range - first and last.
The dates are stored in photodate in the format yyyymmdd 00:00:00.

The SQL is as follows:
SELECT shipname
FROM allships
WHERE allships.photodate BETWEEN first AND last.
First is defined as a variable with a run time value of #first#
Last is similarly defined as #last#.

This works fine when tested as a recordset., but the CS3 produced code produces an error at run time

Parse error: syntax error, unexpected '=', expecting ',' or ')' in C:\htdocs\shipsphp\phpfiles\testit.php on line 34

Line 34 is $first_Recordset1 = #first#;
Looks like it cannot find #first# - but when the sending form is set to get it sends it OK.

Can anyone throw me a life line?


The code for Data entry:
This topic has been closed for replies.
Correct answer whatalotofrubbish
quote:

Originally posted by: Newsgroup User
whatalotofrubbish wrote:
> First is defined as a variable with a run time value of #first#
> Last is similarly defined as #last#.

It looks as though you have been following an old tutorial or
Dreamweaver help file, which gives the examples of variables in that
format. The problem is that format is for ColdFusion, not PHP.

Your variables should be $_GET['first'] and $_GET['last'].

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/



That is correct - the CS3 help file is the latest one on line (my on board one has not worked for about 6 months for some reason) and makes no mention of ColdFusion, just states PHP. However, it should change soon as a result of a note that I posted.

I have often found that Adobe supply help files slanted towards other products in their range, with little or no thought for the majority opf users. I have been stuck on this problem for about a day.

This is the answer - thanks very much David.

1 reply

Inspiring
August 5, 2008
whatalotofrubbish wrote:
> First is defined as a variable with a run time value of #first#
> Last is similarly defined as #last#.

It looks as though you have been following an old tutorial or
Dreamweaver help file, which gives the examples of variables in that
format. The problem is that format is for ColdFusion, not PHP.

Your variables should be $_GET['first'] and $_GET['last'].

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
whatalotofrubbishAuthorCorrect answer
Inspiring
August 6, 2008
quote:

Originally posted by: Newsgroup User
whatalotofrubbish wrote:
> First is defined as a variable with a run time value of #first#
> Last is similarly defined as #last#.

It looks as though you have been following an old tutorial or
Dreamweaver help file, which gives the examples of variables in that
format. The problem is that format is for ColdFusion, not PHP.

Your variables should be $_GET['first'] and $_GET['last'].

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/



That is correct - the CS3 help file is the latest one on line (my on board one has not worked for about 6 months for some reason) and makes no mention of ColdFusion, just states PHP. However, it should change soon as a result of a note that I posted.

I have often found that Adobe supply help files slanted towards other products in their range, with little or no thought for the majority opf users. I have been stuck on this problem for about a day.

This is the answer - thanks very much David.