Jump to content
Server Maintenance This Week. ×

ODBC LIMIT command. Limit returned rows


This topic is 6208 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 6208 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.