April 26, 200718 yr This does not seem to work for me. Does anyone know where I should place the limit property so that I can control how many results are returned? Here is a (basic) MySQL example: "Select 'fieldname' FROM table LIMIT 0,10" This brings back the first 10 records it finds. This causes an error when trying this query with PHP and FileMaker via ODBC. Error is as follows: SQL error: [DataDirect][ODBC SequeLink driver][ODBC Socket][DataDirect][ODBC FileMaker driver][FileMaker]Parse Error in SQL, SQL state S1000 in SQLExecDirect Thanks in advance, Jim.
April 26, 200718 yr Though it seems to be an indispensable feature, you cannot do this in FileMaker ODBC/JDBC, currently. Please submit a feature request. http://www.filemaker.com/company/feature_request.html -- If FileMaker PHP API or FX.php can be your platform, they have corresponding feature, I think.
April 26, 200718 yr Author Do you know this for sure? I cannot believe that this was not included in the ODBC specification. I cannot use FX.php in this instance as I have AND and OR requests in the query. Thanks for your rapid response. Jim.
April 27, 200718 yr I cannot use FX.php in this instance as I have AND and OR requests in the query ... Why not? You just generate multiple find requests.
April 27, 200718 yr Author Thanks again for your reply. How to do a multiple find requests in FX.php then? (With the following as an example). SQL ~ SELECT * FROM TABLE1 WHERE (Field1='1' OR Field1='2' OR Field1='5') AND (Field2='a' OR Field2='b' OR Field2='e') How do I do the above example SQL request with FX.PHP? $userQuery = new FX($serverIP, $webCompanionPort, $dataSourceType); $userQuery->SetDBData ($HostDB, 'LayoutName'); $userQuery->SetDBUserPass('user', 'pass'); $userQuery->AddDBParam('Field1', '1'); $userQuery->AddDBParam('Field1', '2'); $userQuery->AddDBParam('Field1', '5'); $userQuery->AddDBParam('Field2', 'a'); $userQuery->AddDBParam('Field2', 'b'); $userQuery->AddDBParam('Field2', 'e'); $userQuery->AddDBParam('-lop', 'or'); $userData=$userQuery->FMFind(); The above FX.php would not give the same result as the SQL. Thanks, Jim.
April 27, 200718 yr Oh right, because in this case it's searching or over any of the fields? If there's a -lop or, surely there's a -lop and?
April 27, 200718 yr Author That is correct, there is a -lop 'and'. However FX.PHP uses one or the other. You cannot combine a "-lop 'and'" and a "-lop 'or'" in the same request. Thanks, Jim.
April 28, 200718 yr Go ask this question at: www.fmwebschool.com/frm , you'll probably get a better response for Fx.php and FM API related questions there.
Create an account or sign in to comment