Menu

Query Format

Help
2009-09-30
2012-10-23
  • Starwhooper

    Starwhooper - 2009-09-30

    Hi,
    In the examples, i find this command:

    getlistentrywithfields( "form", "(1=1)", 2, 8 );

    The query (1=1) works fine on my system, but i need only all with the String
    "Baum" in the Field 32. I try to use (32="Baum") and
    (32=\"Baum\") and more, but this seams wrong.
    How should be the right query ?

    Regards, Thiemo

     
  • Jens Yllman

    Jens Yllman - 2009-10-01

    The query format is the same as you use in user tool. So
    '<fieldlabel/fieldid>' = "<value>" is the base form.
    Fieldlabel is the label in the default admin view if no other view specified.
    And at the moment specifying view is not implemented in php-arapi. So, the
    'easiest' way is to use fieldid.

     
  • Jens Yllman

    Jens Yllman - 2009-10-01

    The reason why I have 1=1 is that if the server does not allow unqualified
    queries you have to have something, even when you want to get all. 1=1 will
    match all records/rows in a form, that you have permission to see.

     
  • Starwhooper

    Starwhooper - 2009-10-02

    Hi,

    "(1000000082 = \"Draeger\")" and '(1000000082 =
    "Draeger")' become the message: Data types are not appropriate for
    relational operation

    "(1000000082 = "Draeger")" will not work with php

    "(1000000082 = Draeger)" becomes the message: Cannot open catalog;
    Message number = 1587: position 21 (...00082 = Draeger^))

    May you help me, how can i search the string "Draeger" in the field
    1000000082 with the function arapi_getlistentrywithfields ?

     
  • Jens Yllman

    Jens Yllman - 2009-10-02

    The string you want to go inte php-arapi would look like this

    '1000000082' = "Draeger"

    And since you have to put this in some kind of string in PHP it would look
    like this.

    "'1000000082' = \"Draeger\""

    or maybe this

    '\'1000000082\' = "Draeger"'

    I actually don't know which is most PHP or not. You can read your self for
    more about strings in PHP.

    http://www.php.net/manual/en/language.types.string.php

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.