From: Alex B. <en...@tu...> - 2001-08-22 18:26:05
|
> Hmm. I think thats a problem with the column naming. They are mixed case in > MySQL and also retured in mixed case with the result meta data while they > seem to be upper case in oracle. > I'm not experienced with oracle so I'm not comfortable with the differences. > But I guess thats the prob. Here's a desc on the table: SQL> desc news Name Null? Type ----------------------------------------- -------- ---------------------------- NEWSID NUMBER(38) NEWS VARCHAR2(255) so yes, you seem to be right. :) > Note/Assumtion: > So the changes you made to the schmema will work with oracle but not with > mysql. MySQL assumes that the column newsId in the SELECT statement > represents exactly the fieldname "newsId" in the table. So SELECT newsid and > SELECT newsId are acutually addressing two different fields in MySQL. How so? i.e. if you create the table with all uppercase field names in mySQL, they should all be compatible. I'll work on getting QM to see the table + fields, then report back.. > But back to the prob: Try the following: > > Look at QueryManager line 636: > and uncomment this line: > > $_buffer[$row][strtoupper($field)] = $value; > > and comment out the following: > > $_buffer[$row][$field] = $value; > > Then in the output method of the query_example the asoc array should be > changed to macht the uppercase indices. OK, here's what I did: I made sure all my field references were upper-case: CREATE TABLE NEWS (NEWSID int default NULL,NEWS varchar(255)); (text is an invalid datatype in oracle) $query = array( 'QUERY' => 'SELECT NEWSID, NEWS FROM NEWS', 'ARGTYPES' => array('integer','text'), and $this->result[$row]['NEWSID']; $this->result[$row]['NEWS']; That worked. I'm doing a sync now, can we try and get SQL that works with MySQL _and_ Oracle? I'll shortly be able to test on both. I've done a sync, you can update your sandbox. _a |