MySQL Forums
Forum List  »  Optimizer & Parser

Help with handlersocket
Posted by: Srinivasan T
Date: May 16, 2011 05:41AM

Hi,

I'm working with MySQL handlersocket APIs in reading/writing data from/to MySQL.

While fetching data from MySQL, is it possible to provide multiple comparisons with more than one comparison operator through MySQL handlersocket.

For example, in a STUDENTS table as below,

+-------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+--------------+------+-----+---------+-------+
| SNO | int(11) | NO | PRI | NULL | |
| SNAME | varchar(100) | NO | | NULL | |
| CITY | varchar(100) | NO | | NULL | |
| PHONE | int(11) | NO | | NULL | |
| TOTAL | int(11) | NO | | NULL | |
+-------+--------------+------+-----+---------+-------+

I need to fetch the data through handlersocket similar to the below (as we do in SQL),

select * from STUDENTS where SNAME='Mike' and TOTAL > 50;

That is SNAME with = operator and TOTAL with > operator. I checked the handlersocket protocol specifications but I don't find any options to provide multiple comparison operators.

Also, it is possible do max(), count(), order by through handlersocket.

Regards,
Srinivasan

Options: ReplyQuote


Subject
Views
Written By
Posted
Help with handlersocket
3342
May 16, 2011 05:41AM
1431
May 18, 2011 10:32PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.