Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

error code by CS3

Engaged ,
Aug 05, 2008 Aug 05, 2008
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:
TOPICS
Server side applications
307
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Engaged , Aug 06, 2008 Aug 06, 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 Gui
...
Translate
LEGEND ,
Aug 05, 2008 Aug 05, 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/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 06, 2008 Aug 06, 2008
LATEST
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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines