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

Recordset

New Here ,
Jul 09, 2007 Jul 09, 2007
Tring to create recordset from Query which is a keyword results page if i base the results page on one column of the table ie:

SELECT *
FROM Category
WHERE Supplier Like %MMColParam%

all works fine but if i want to add columns to search for keywords ie:

SELECT *
FROM Category
WHERE Supplier Like %MMColParam% OR Product_Type Like %MMColParam%

I get a syntax error in query expression error, any idears what i am doing wrong.

Thanks

John
TOPICS
Server side applications
482
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
LEGEND ,
Jul 09, 2007 Jul 09, 2007
John

Try placing a ' around the the second call on the variable like this

WHERE Supplier Like %MMColParam% OR Product_Type Like '%MMColParam%'


--
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver

Valleybiz Internet Design
www.valleybiz.net

"pepps" <webforumsuser@macromedia.com> wrote in message
news:f6tgk6$sub$1@forums.macromedia.com...
> Tring to create recordset from Query which is a keyword results page if i
> base
> the results page on one column of the table ie:
>
> SELECT *
> FROM Category
> WHERE Supplier Like %MMColParam%
>
> all works fine but if i want to add columns to search for keywords ie:
>
> SELECT *
> FROM Category
> WHERE Supplier Like %MMColParam% OR Product_Type Like %MMColParam%
>
> I get a syntax error in query expression error, any idears what i am doing
> wrong.
>
> Thanks
>
> John
>


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
New Here ,
Jul 10, 2007 Jul 10, 2007
Hi thanks for the reply,

I tried what you said and although when you click test it does not throw any syntax errors, when you test in on IE explorer, it will return the Like for the first one ie supplier but if you typed in a Product_type keyword, it will not return anything, but no errors apper.

Any more sugetions greatly appreciated

Thanks
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
New Here ,
Jul 10, 2007 Jul 10, 2007
Surley dreamweaver can handle this simple request it just sems really silly
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
LEGEND ,
Jul 10, 2007 Jul 10, 2007
Yes, it can. You just have to write the proper SQL for it.

Look into the syntax for LIKE

"pepps" <webforumsuser@macromedia.com> wrote in message
news:f70om5$2uc$1@forums.macromedia.com...
> Surley dreamweaver can handle this simple request it just sems really
> silly


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
New Here ,
Jul 10, 2007 Jul 10, 2007
LATEST
i have done that and when i test it all is ok but when i run it in IE it only produces the first Like the rest ie the OR's do not display data, please can you help
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