cursor

Looping Over Result Sets in MySQL (Resolved: Using Cursors)

I am trying to write a stored procedure in MySQL which will perform a somewhat simple select query, and then loop over the results in order to decide whether to perform additional queries, data transformations, or discard the data altogether. Effectively, I want to implement this: $result = mysql_query("SELECT something FROM somewhere ...

Detecting if mouse position is within a set of position rules?

I have some JavaScript objects such as this (it's psuedo so I know if syntax is wrong): [{ "divid":"1","x1":"35","y1":"100","height":"150","width":"150" }, { "divid":"2","x1":"45","y1":"110","height":"150","width":"150" }, { "divid":"3","x1":"55","y1":"120","height":"150","width":"150" }, { "divid":"4","x1":"65","y1":"130","height":"150...

(Probably) Simple SQL Server cursor question

I need to call two stored procedures in sequence via ODBC in PHP: #run stored procedure 1 $query = "Shipped_Not_Shipped_Rep ".$_GET['rep_id']; $result = odbc_exec($dbh, $query); odbc_result_all($result); #run stored procedure 2 $query = "Shipped_Not_Shipped_Account ".$_GET['account_id']; $result = odbc_exec($dbh, $query); odbc_result_a...

is it good to use Wait cursor in websites?

Hi all. Just wanted to ask - is it good to use Wait cursor in websites? on heavy loading pages.. we dont generally see it used with websites...(please share some if u have seen any) if i implement the following.... will it be compatible with the current browsers? function doHourglass() { document.body.style.cursor = 'wait'; } and...

actionscript 3 - how to hide default cursor in chrome?

is there a way to hide default cursor[flash]when it's opened using chrome? i can hide it using ordinary way when it's opened using firefox/IE but somehow it doesn't work when it's opened using google chrome. Many thanks ...

SQL to standardize/clean up First/Middle/Last name fields

I'm writing a function in SQL that we can use to validate First/Middle/Last names we have in a given table. At the moment I'm working on a list of ascii codes for characters that I'm going to consider invalid and strip out of the input. My plan is to create a table which contains the character codes of those characters I consider to be...

Understanding Twitter API's "Cursor" parameter

I don't really get how to use the Curesor parameter in Twitter's API, for an exmaple - here. Am I supposed to make a new API call for each 100 followers? I'd love it if someone could provide a PHP example for getting a full list of followers assuming I have more than 100... Thanks in advance! ...

How to populate a cursor during execution

I am currently trying to populate a cursor in the procedure. like that : Function notImportantFunction variable nothing(20); Cursor notImportantCursor Is select...; Cursor THEcursor; begin open notImportantCursor; open THEcursor; LOOP FETCH notImportantCursor variable; EXIT WHEN notImportantCursor%NOTFO...

Notepad++ stylers.model: Edit to change cursor color to white to hide it / stop it from blinking?

In notepad++, I sometimes get annoyed with the blinking of the insertion point. I couldn't find any info on how to hide it. Changing the cursor behavior in Windows' accessibility options only affects Word. I saw a post mentioning how you can edit the "stylers.model" file: "Yes, you can change the cursor color, edit the stylers.xml. How...

Calling a procedure that uses reference cursors from another procedure?

How can I call a procedure that uses reference cursors from another procedure? ...

Are oopen cursors forward-only and read-only?

Is a cursor created with oopen (from the Oracle 7.x OCI api) forward-only and read-only? Thanks, Eric ...

Open Word document with cursor disabled

Is there any way to create a word document where the cursor is invisible or disabled? After I save the document as read only, I want it to be opened like a pdf where even if a cursor is placed and typed, nothing is written on the document. ...

Clear Cursor Clip C#

Hey, I am trying to lock the cursor into the form, this is for a mouse locker application, I am trying to dispose the cursor so it will reset the Cursor.clip when they unlock it. So far I have: Cursor.Clip = new Rectangle(x +8, y +30, Size.Width -16, Size.Height -38); That works fine. But I cannot figure out how to clear the clip when...

How to efficiently use MySQLDB SScursor ?

Hi, I have to deal with a large result set (could be hundreds thousands of rows, sometimes more). They unfortunately need to be retrieved all at once (on start up). I'm trying to do that by using as less memory as possible. By looking on SO I've found that using SSCursor might be what I'm looking for, but I still don't really know how...

SQL query comparision in ProC with and without using cursor

Which, query performance wise, is more effective? Considering T is a table, and PK is the primary key in the table T. Are they different or they are just a matter of choice? select col1, col2 into :var1, :var2 from T where PK = a ...or: EXEC SQL DECLARE aCursor CURSOR FOR select col1, col2 into :var1, :var2 from T where PK = a...

PeekMessage() Resetting the Mouse Cursor [Solved]

Im currently messing around with changing the mouse cursor within a game like C++ application for Windows XP. To change the cursor I am using SetCursor() and passing in the desired cursor, which is working. However during the while loop in which PeekMessage() is called the cursor keep getting reset back to the default arrow. This is t...

LEFT JOIN for current row in primary table

This is the question about JDBC. I have next task. I'm iterating through rows from table A and for some current row I want to execute some query against table B in context of current row from A. For example, if I have some query like SELECT B.description FROM A LEFT JOIN B ON A.ID = B.refId then I want to get all results where B.refI...

PHP Twitter API Cursor?

Hi, If i use the "cursor"=>"-1" i get pagination, at which i can read the next_cursor. I get 1.312477885269E+18 when i read next_cursor. To call again, i set the cursor as the next_cursor which was returned back from the previous call, 1.312477885269E+18 - do i send it in this format, or somehow do i have to convert this into an int? ...

Does SQLite have Cursors?

Hi there, i wonder if i could run the following procedure in SQLite: set nocount on select T.ID, max(T.SerialNo) as SerialNo into #Tmp_Ticket_ID from Ticket as T, Ticket as inserted where t.ID = inserted.ID group by T.id having count(*) > 1 declare zeiger cursor for select SerialNo from #Tmp_Ticket_ID declare @SerialNo int ...

A database question for storing and computing with historical data.

I have an application that polls different bins at different times and computes the number of widgets in each bin based on the weight. Polling is done every few minutes and the result is timestamped and added to a MySQL table. The table contains the 3 columns below. The example shows 3 bins (A,B and C) but there could be anywhere from 1 ...