Problem Solved? Mark this thread resolved using the Thread Tools. Apache HQ | PHP HQ | MySQL HQ | LinkedIn
0100001001111001011101000110010100100000011011010110010100100001
Thanks for the suggestions, but id is not a reserved word and encapsulating the string in backticks tells MySQL to use the string as a column instead of a keyword.
Problem Solved? Mark this thread resolved using the Thread Tools. Apache HQ | PHP HQ | MySQL HQ | LinkedIn
0100001001111001011101000110010100100000011011010110010100100001
I can't see from the query provided how it could result in that error. Usually it occurs when there is a mismatch resulting from incorrect use of parentheses and usually in conjunction with sub-queries, which obviously does not seem to apply here.
I'm not familiar with the Zend framework, but should there be some method call to execute the query prior to the fetchRow() call?
Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be." ~ from Nation, by Terry Pratchett
"But the main reason that any programmer learning any new language thinks the new language is SO much better than the old one is because he’s a better programmer now!" ~ http://www.oreillynet.com/ruby/blog/...ck_to_p_1.html
Cardinality
The number of unique values in the index. This is updated by running ANALYZE TABLE or myisamchk -a. Cardinality is counted based on statistics stored as integers, so it's not necessarily accurate for small tables. The higher the cardinality, the greater the chance that MySQL uses the index when doing joins.
99 little bugs in the code, 99 bugs in the code,
fix one bug, compile it again...
101 little bugs in the code....
SELECT `g`.*, `u2g`.* FROM `users2groups` AS `u2g` RIGHT JOIN `groups` AS `g` ON `g`.`groupid` = `u2g`.`uggid` WHERE `u2g`.`uguid` = '5bc40bc6-7974-102b-8a2c-d23ebefec1c9'
SQLSTATE[21000]: Cardinality violation: 1241 Operand should contain 1 column(s)
From the SyBase PDF linked above:
Cardinality violations occur when a query that should return only a
single row returns more than one row to an Embedded SQL™
application.
That makes sense, but it doesn't apply to my situation, from what I can tell.
Can anyone see what I am doing wrong? The SQL executes in phpMyAdmin (and returns only one row), just not through the Zend framework. It shouldn't matter that it is going through ZF though, since it is returning a valid SQL error ZF is doing it's job.
## edit
I found this on page 159, section 5-37 under lock manager messages, code 1241
A semaphore cursor refers to a different semaphore than the one it is linked to.
In English, I think that means:
The column you are accessing refers to a column other than the one you want.
... how would I resolve that?
Last edited by Kudose; 05-22-2008 at 03:46 PM.
Problem Solved? Mark this thread resolved using the Thread Tools. Apache HQ | PHP HQ | MySQL HQ | LinkedIn
0100001001111001011101000110010100100000011011010110010100100001
Problem Solved? Mark this thread resolved using the Thread Tools. Apache HQ | PHP HQ | MySQL HQ | LinkedIn
0100001001111001011101000110010100100000011011010110010100100001
Kudose, I don't think it's a bug but rather you're missing the actual query to the database.
You have to execute $db->query($this->query) otherwise you're not querying the database. At least that's from my limited knowledge of ZF database stuff.
I was able to get it figured out by creating a Zend_Db_Table_Select object and passing it to Zend_Db_Table
Problem Solved? Mark this thread resolved using the Thread Tools. Apache HQ | PHP HQ | MySQL HQ | LinkedIn
0100001001111001011101000110010100100000011011010110010100100001
I also ran through the same error message while trying to run the "SELECT * FROM <table_name>" query. After a lot search on the net I resolved the error. The query was:
Bookmarks