• lor342

    (@lor342)


    I need to filter data, and have to use a SQL statement rather than the simpler table=”tablename”. Unless there is some way to filter the table?

    [abase table=”services” order=”Name” columns=”Name,ShortIntro,ContactNumber,Category” rlink=”Name,page_id=123″]

    I have a second page (page_id 123) to display the detail of the record selected from the list view. I did this with this command:

    [abase table=”services” fields=”Name,ShortIntro,ContactNumber,Category”]

    All works fine, until I change the list view to:

    [abase sql=”SELECT Name,ShortIntro,ContactNumber,Category FROM services WHERE Category=’Sport'” order=”Name” columns=”Name,ShortIntro,ContactNumber,Category” rlink=”Name,page_id=123″]

    In the SQL version, no data is returned on page 123. I tried changing the table=”services” to my SQL statement, but that didn’t work either…

    Help!

    https://www.ads-software.com/plugins/abase/

Viewing 1 replies (of 1 total)
  • Loulou51

    (@loulou51)

    Try this code :
    [abase sql=”SELECT Name,ShortIntro,ContactNumber,Category FROM services WHERE Category=’Sport’ ORDER BY Name ” rlink=”Name,page_id=123″]

    Fields define in the SELECT clause are equivalent to colums=”….”
    The ORDER clause in SQL request replace order=”Name”

Viewing 1 replies (of 1 total)
  • The topic ‘Viewing a record after using SQL’ is closed to new replies.