473,378 Members | 1,400 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

sql query not returning correct results

i'm using an entry in an sql database as a semaphore and it,
unfortunately, doesn't appear to be working. the script that spawns
the child processes has a for loop that performs the same basic sql
query over and over again until the value has changed (there's a one
second delay between each query). unfortunately, the resultant row is
always the same, even when the other process *has* changed it. as an
example, if the orig. value was of the entry was 0, and one second into
the execution of the second process, the entry was changed to 1, my
program would, even 10 seconds later, fetch 0. in other words, it'd
never be aware of the change.

any idea as to why this is and what i can do to fix it? thanks!

Jul 17 '05 #1
2 1528
yawnmoth (te*******@yahoo.com) wrote:
: i'm using an entry in an sql database as a semaphore and it,
: unfortunately, doesn't appear to be working. the script that spawns
: the child processes has a for loop that performs the same basic sql
: query over and over again until the value has changed (there's a one
: second delay between each query). unfortunately, the resultant row is
: always the same, even when the other process *has* changed it. as an
: example, if the orig. value was of the entry was 0, and one second into
: the execution of the second process, the entry was changed to 1, my
: program would, even 10 seconds later, fetch 0. in other words, it'd
: never be aware of the change.

: any idea as to why this is and what i can do to fix it? thanks!

Perhaps the other process hasn't committed the changes?

--

This space not for rent.
Jul 17 '05 #2

Malcolm Dew-Jones wrote:
yawnmoth (te*******@yahoo.com) wrote:
: i'm using an entry in an sql database as a semaphore and it,
: unfortunately, doesn't appear to be working. the script that spawns : the child processes has a for loop that performs the same basic sql
: query over and over again until the value has changed (there's a one : second delay between each query). unfortunately, the resultant row is : always the same, even when the other process *has* changed it. as an : example, if the orig. value was of the entry was 0, and one second into : the execution of the second process, the entry was changed to 1, my
: program would, even 10 seconds later, fetch 0. in other words, it'd : never be aware of the change.

: any idea as to why this is and what i can do to fix it? thanks!

Perhaps the other process hasn't committed the changes?


I guess a syntax error could result changes not being committed, heh.
'cause that's what the problem turned out to be. Thanks for the
suggestion! :)

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: jaysonsch | last post by:
Hello! I am having some problems with a database query that I am trying to do. I am trying to develop a way to search a database for an entry and then edit the existing values. Upon submit, the...
0
by: Aaron Wolski | last post by:
------=_NextPart_000_0175_01C35FE2.BC685E70 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi Guys, I have 2 queries: select * FROM kcs_threadgroups AS t1,...
8
by: Rigga | last post by:
Hi, I am new to mysql and need help on how to join tables. I have a database which contains 4 tables, the main table contains information by date order and the other 3 contain data also in date...
8
by: san | last post by:
Hi, I wanted to know if this is possible and if so, how do I do it. Say, I have a query "SELECT * FROM Table WHERE Column="some_value". This executes on a very large data set and I would like...
4
by: Jim | last post by:
Hi I'm looking to take an existing XML document, query for certain nodes, and 'recreate' the document with just the relevant nodes. I'm currently using XPath - I have established the pattern that...
1
by: Klint Gore | last post by:
query is select t2.field4, t1.* from t1 left outer join t2 on t2.field1 = t1.field1 and t2.field2 = t1.field2 There are 55k rows in t1 (103 fields) and 10k in t2 (4 fields, 4 is text)....
7
by: serge | last post by:
How can I run a single SP by asking multiple sales question either by using the logical operator AND for all the questions; or using the logical operator OR for all the questions. So it's always...
1
by: thepresidentis | last post by:
here is my problem, i have a website that compiles concert listings for users to search for shows in their local area, i ran into a problem with returning search results due to an improper format...
10
klarae99
by: klarae99 | last post by:
I am working on an Inventory Database in Access 2003. I am having trouble with a report I designed to show current inventory in stock. I have a form (frmInventory) that is unbound. There are four...
2
by: paulmitchell507 | last post by:
I think I am attempting a simple procedure but I just can't figure out the correct syntax. My asp (classic) page runs a SELECT query to obtain dates and ID's from 2 tables uSQL = "SELECT...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.