Ask Your Question

Having Issues Pulling Results in PhRETS

asked 2019-07-01 15:47:31 -0500

I am developing for a WordPress site and am getting an error that states: "Unexpected end of Query.". I have no idea what I'm doing wrong. I'm just putting in the example query from the documentation .


$config = new \PHRETS\Configuration;
    $config->setRetsVersion('1.7.2'); // see constants from \PHRETS\Versions\RETSVersion
$config->setHttpAuthenticationMethod('digest'); // or 'basic' if required 
$config->setOption('use_post_method', false); // boolean
$config->setOption('disable_follow_location', false); // boolean

$rets = new \PHRETS\Session($config);

$connect = $rets->Login();

    $results = $rets->Search(
        ['Limit' => 3, 'Select' => 'LIST_1,LIST_105,LIST_15,LIST_22,LIST_87,LIST_133,LIST_134']

foreach ($results as $r) {
edit retag flag offensive close merge delete


The Select parameter needs to be changed to use the actual field names from Paragon RETS.
Or you can use '*' to return all fields.
Also make sure to call: $rets->Disconnect() to close the session when finished.

bwolven gravatar imagebwolven ( 2019-07-01 15:52:46 -0500 )edit

Were you able to get this working?

bwolven gravatar imagebwolven ( 2019-07-02 09:24:16 -0500 )edit

I'm still having issues. It's saying "unexpected end of query" when I put *.

$connect = $rets->Login(); if ($connect) {

    $results = $rets->Search("Property","RE_1","*", ['Limit' => '3']);

    echo "Results: " . $results->getTotalResultsCount() . "<br/>";
    foreach ($results as $record) {

zslagowski gravatar imagezslagowski ( 2019-07-02 18:39:05 -0500 )edit

If I change "*" to "L_City=GILL" it gives me no error but returns 0 results.

zslagowski gravatar imagezslagowski ( 2019-07-02 18:39:39 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-07-03 07:21:45 -0500

What is your account name (NO PASSWORD)?
Try this query: (L_ListingID=0+)

edit flag offensive delete link more


Awesome that seemed to pull in some results. I'll work with this and see what I can work with. Thanks so much!

zslagowski gravatar imagezslagowski ( 2019-07-03 16:39:27 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-07-01 15:47:31 -0500

Seen: 100 times

Last updated: Jul 01