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

Simple database query

New Here ,
Nov 16, 2007 Nov 16, 2007
Hello everyone,

i would like to have one recordset that i will use for showing all results from it, but also to filter it with url parameter.
Now, long time ago, somebody told me to create simple query with desired filter, then switch to advanced, and edit 'colname'(or whatever i name it) default value to 0 OR 1=1.
That worked fine till i tried that with CS3 Dreamweaver. When i try that it doesnt work.
So my question basicaly is:
How can i create one (it is important to be one) recordset that will show all results if no params were passed to that PHP page, and filtered result on params if there are params passed to that page.

Thanks in advance

EDIT
And i forgot to mention when i click test on database recordset window, i get listed all results from query, yet, when i run page from browser, i dont retrieve any database entries...
TOPICS
Server side applications
244
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 ,
Nov 16, 2007 Nov 16, 2007
LATEST
Ok i have solve it, but i dont know why it doesnt work out of the box actually...
Out of the box query looked like
$query_Recordset1 = sprintf("SELECT * FROM artefacts WHERE artefact_id = %s", GetSQLValueString($colname_Recordset1, "int"));

and the one that worked as in previous version
$query_Recordset1 = sprintf("SELECT * FROM artefacts WHERE artefact_id = $colname_Recordset1", GetSQLValueString($colname_Recordset1, "int"));

Thanks for reading, hope some from Adobe team will drop in to comment this...
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