cakephp 3.0 and snelg/cakephp-3-oracle [ Error: [Cake\Database\Exception] Cannot describe s_i18_n. It has 0 columns.]
When i try to perform bake command i receive this exception Exception: Cannot describe s_i18_n. It has 0 columns. in [/var/www/html/3.0/app-master/vendor/cakephp/cakephp/src/Database/Schema/Collection.php, line 98] 2016-01-21 15:07:24 Error: [Cake\Database\Exception] Cannot describe s_i18_n. It has 0 columns. Stack Trace: #0 /var/www/html/3.0/app-master/vendor/cakephp/cakephp/src/Database/Schema/CachedCollection.php(64): Cake\Database\Schema\Collection->describe('s_i18_n', Array) #1 /var/www/html/3.0/app-master/vendor/cakephp/cakephp/src/ORM/Table.php(423): Cake\Database\Schema\CachedCollection->describe('s_i18_n') #2 /var/www/html/3.0/app-master/vendor/cakephp/cakephp/src/ORM/Table.php(499): Cake\ORM\Table->schema() #3 /var/www/html/3.0/app-master/vendor/cakephp/bake/src/Shell/Task/ModelTask.php(194): Cake\ORM\Table->primaryKey() #4 /var/www/html/3.0/app-master/vendor/cakephp/bake/src/Shell/Task/ModelTask.php(110): Bake\Shell\Task\ModelTask->getAssociations(Object(Cake\ORM\Table)) #5 /var/www/html/3.0/app-master/vendor/cakephp/bake/src/Shell/Task/ModelTask.php(96): Bake\Shell\Task\ModelTask->bake('SI18N') #6 /var/www/html/3.0/app-master/vendor/cakephp/bake/src/Shell/BakeShell.php(250): Bake\Shell\Task\ModelTask->main('SI18N') #7 /var/www/html/3.0/app-master/vendor/cakephp/cakephp/src/Collection/CollectionTrait.php(51): Bake\Shell\BakeShell->Bake\Shell\{closure}('SI18N', 0) #8 /var/www/html/3.0/app-master/vendor/cakephp/bake/src/Shell/BakeShell.php(253): Cake\Collection\Collection->each(Object(Closure)) #9 [internal function]: Bake\Shell\BakeShell->all('SI18N') #10 /var/www/html/3.0/app-master/vendor/cakephp/cakephp/src/Console/Shell.php(443): call_user_func_array(Array, Array) #11 /var/www/html/3.0/app-master/vendor/cakephp/cakephp/src/Console/ShellDispatcher.php(212): Cake\Console\Shell->runCommand(Array, true, Array) #12 /var/www/html/3.0/app-master/vendor/cakephp/cakephp/src/Console/ShellDispatcher.php(179): Cake\Console\ShellDispatcher->_dispatch(Array) #13 /var/www/html/3.0/app-master/vendor/cakephp/cakephp/src/Console/ShellDispatcher.php(126): Cake\Console\ShellDispatcher->dispatch(Array) #14 /var/www/html/3.0/app-master/bin/cake.php(33): Cake\Console\ShellDispatcher::run(Array) #15 {main} is somebody know how to fix this? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at https://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: Postgresql for Oracle in CakePHP
Hey Carlos, The last version of CakePHP that had support for Oracle was 1.3. We've not been able to get support for oracle into 2.x or 3.0 primarily because of licensing issues and lack of experience. Because of how oracle is licensed adding it to one of our existing continuous integration systems has not been possible. Additionally, there isn't anyone on the core team that has a great deal of experience working with oracle. While there have been a few people asking on the mailing list, IRC and twitter about oracle support, no one has shared working code. -Mark On Wednesday, 12 November 2014 09:07:15 UTC-5, Carlos Henrique Amaral Santos wrote: Hi, I'm working on a system, using CakePHP 1.1 and database PostgreSQL. There's a change of the database from PostgreSQL for Oracle. Someone had issue with something like it? Someone suggests some version of the Cake that works well with Oracle? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Postgresql for Oracle in CakePHP
Hi, I'm working on a system, using CakePHP 1.1 and database PostgreSQL. There's a change of the database from PostgreSQL for Oracle. Someone had issue with something like it? Someone suggests some version of the Cake that works well with Oracle? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: Cake 2.5 connecting to Oracle
I used to use the attached datasource, heavily modified from Cake1.3 In the config file, these are the settings public $oracle = array( 'datasource' = 'Database/Oracle', 'driver' = 'oracle', 'connect' = 'oci_pconnect', 'persistent' = false, 'host' = '123.123.123.123', 'login' = 'user', 'password' = 'password', 'database' = '123.123.123.123:1521/dbname', 'prefix' = '', 'schema' = 'dbname' ); On Monday, 13 October 2014 14:39:17 UTC+8, wilderland wrote: Hello, In Cake 1.3 it was possible to connect to Oracle. In CakePHP 2.5 I don't find a Datasource. I would like to know if there roadmap for 2.6 or 3.0 to connect to Oracle? Did somebody know a datasource implementation for CakePHP 2.5 Looking forward to get your responce. Best Regards Sebastian -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout. attachment: Oracle.php
Re: Cake 2.5 connecting to Oracle
I have the same problem last week and I found this: http://www.hassanbakar.com/2012/01/09/using-oracle-in-cakephp-2-0/ it needs minor adjustments but it's functional as well. But, if someone has other examples/links will be good Em segunda-feira, 13 de outubro de 2014 02h39min17s UTC-4, wilderland escreveu: Hello, In Cake 1.3 it was possible to connect to Oracle. In CakePHP 2.5 I don't find a Datasource. I would like to know if there roadmap for 2.6 or 3.0 to connect to Oracle? Did somebody know a datasource implementation for CakePHP 2.5 Looking forward to get your responce. Best Regards Sebastian -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Cake 2.5 connecting to Oracle
Hello, In Cake 1.3 it was possible to connect to Oracle. In CakePHP 2.5 I don't find a Datasource. I would like to know if there roadmap for 2.6 or 3.0 to connect to Oracle? Did somebody know a datasource implementation for CakePHP 2.5 Looking forward to get your responce. Best Regards Sebastian -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
CakePHP and Oracle
Hello to everyone, i am using CakePHP 1.3.14(15) with Oracle. But the newer versions of CakePHP officially doesnt support Oracle. Do you know if it will be developed? Is there any news about that? I am working in a company and we will be changing the Framework in the future if we dont find a solution. I want to keep working with Cake. Thank you all. Guilherme Pedrosa Lima Brazil -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Sequence in Oracle
Hi Bruno, I don't know if this helps you. Change your trigger, so you only retrieve a new sequence number if the field is empty. Something like this: CREATE OR REPLACE TRIGGER TRG_CARL_ID BEFORE INSERT ON CARLINES FOR EACH ROW BEGIN IF :new.carl_id IS NULL THEN SELECT seq_carl_id.nextval INTO :new.carl_id FROM dual; END IF; END; Best regards Tom Am Montag, 2. Juli 2012 19:53:19 UTC+2 schrieb Bruno Augusto: friends, I am using oracle database and when execute the save command the oracle save and on the same time it run a currval sequence. The problem is I do not need to use sequence in this table. Is there anyway from cake does not execute the sequence? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Sequence in Oracle
Friends, I am using oracle database and when execute the save command the oracle save and on the same time it run a currval sequence. The problem is I do not need to use sequence in this table. Is there anyway from cake does not execute the sequence? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Sequence in Oracle
friends, I am using oracle database and when execute the save command the oracle save and on the same time it run a currval sequence. The problem is I do not need to use sequence in this table. Is there anyway from cake does not execute the sequence? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Oracle
i can pass params on my find call .. refer this https://bitbucket.org/odin88/cakephp-2.0-oracle/changeset/535a4133a59e On Tuesday, 22 May 2012 21:38:41 UTC+8, rihad wrote: Have you been able to use any conditionals in your find() calls? I can't use even the simplest ones. See this thread: http://groups.google.com/group/cake-php/browse_thread/thread/234f4a33b862d79a# On May 22, 4:31 pm, oDiN odi...@gmail.com wrote: I have update the blog post. Check the latest code at Bitbucket. Also the stored procedure works fine too in CakePHP 2.1.2 On Monday, 21 May 2012 20:46:46 UTC+8, rahajiyev wrote: OMG, I just succeeded in getting paginator to work properly, with sorting and all that! Apart from what was said in the tutorial above, I also needed to tweak function describe() in Oracle.php. The line where it says $sql = 'SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH FROM all_tab_columns WHERE table_name = \''; Changed $sql .= strtoupper($this-fullTableName($model)) . '\''; to $sql .= strtoupper($model-useTable) . '\''; Because WHERE table_name=prefix.my_table_name returns 0 results as compared to my_table_name with no prefix part. So far so good. If only I could get simple updates to work, life would be beautiful :) Haven't tried that yet. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Oracle
I dont have problems with the prefix table .. :) On May 21, 8:46 pm, rahajiyev rahaji...@bankofbaku.com wrote: OMG, I just succeeded in getting paginator to work properly, with sorting and all that! Apart from what was said in the tutorial above, I also needed to tweak function describe() in Oracle.php. The line where it says $sql = 'SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH FROM all_tab_columns WHERE table_name = \''; Changed $sql .= strtoupper($this-fullTableName($model)) . '\''; to $sql .= strtoupper($model-useTable) . '\''; Because WHERE table_name=prefix.my_table_name returns 0 results as compared to my_table_name with no prefix part. So far so good. If only I could get simple updates to work, life would be beautiful :) Haven't tried that yet. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Oracle
I have update the blog post. Check the latest code at Bitbucket. Also the stored procedure works fine too in CakePHP 2.1.2 On Monday, 21 May 2012 20:46:46 UTC+8, rahajiyev wrote: OMG, I just succeeded in getting paginator to work properly, with sorting and all that! Apart from what was said in the tutorial above, I also needed to tweak function describe() in Oracle.php. The line where it says $sql = 'SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH FROM all_tab_columns WHERE table_name = \''; Changed $sql .= strtoupper($this-fullTableName($model)) . '\''; to $sql .= strtoupper($model-useTable) . '\''; Because WHERE table_name=prefix.my_table_name returns 0 results as compared to my_table_name with no prefix part. So far so good. If only I could get simple updates to work, life would be beautiful :) Haven't tried that yet. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Oracle
Have you been able to use any conditionals in your find() calls? I can't use even the simplest ones. See this thread: http://groups.google.com/group/cake-php/browse_thread/thread/234f4a33b862d79a# On May 22, 4:31 pm, oDiN odi...@gmail.com wrote: I have update the blog post. Check the latest code at Bitbucket. Also the stored procedure works fine too in CakePHP 2.1.2 On Monday, 21 May 2012 20:46:46 UTC+8, rahajiyev wrote: OMG, I just succeeded in getting paginator to work properly, with sorting and all that! Apart from what was said in the tutorial above, I also needed to tweak function describe() in Oracle.php. The line where it says $sql = 'SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH FROM all_tab_columns WHERE table_name = \''; Changed $sql .= strtoupper($this-fullTableName($model)) . '\''; to $sql .= strtoupper($model-useTable) . '\''; Because WHERE table_name=prefix.my_table_name returns 0 results as compared to my_table_name with no prefix part. So far so good. If only I could get simple updates to work, life would be beautiful :) Haven't tried that yet. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Oracle
On May 22, 11:58 am, oDiN odi...@gmail.com wrote: I dont have problems with the prefix table .. :) When you connect as the owner of the database, you don't need to use the prefix. But when you grant selective access to another user, he generally needs to say schema_name.table_name. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Oracle
Has anyone had any luck using Oracle database in 2.1.2? I was able to migrate oracle.php from 1.3.15 using this howto: http://www.hassanbakar.com/2012/01/09/using-oracle-in-cakephp-2-0/ but am having trouble using find() even on simplest tables. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Oracle
OMG, I just succeeded in getting paginator to work properly, with sorting and all that! Apart from what was said in the tutorial above, I also needed to tweak function describe() in Oracle.php. The line where it says $sql = 'SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH FROM all_tab_columns WHERE table_name = \''; Changed $sql .= strtoupper($this-fullTableName($model)) . '\''; to $sql .= strtoupper($model-useTable) . '\''; Because WHERE table_name=prefix.my_table_name returns 0 results as compared to my_table_name with no prefix part. So far so good. If only I could get simple updates to work, life would be beautiful :) Haven't tried that yet. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Using Oracle
Most tables in our Oracle database are huge with tens of columns, have no single-column primary keys, or have multi-column keys. Can CakePHP 2.1 make sense of it all? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Using Oracle
IMO with a cluttered schema i would rely on stored procedures for the abstraction and keep the code complexity at a minimum On May 11, 2012 11:54 PM, rihad ri...@mail.ru wrote: Most tables in our Oracle database are huge with tens of columns, have no single-column primary keys, or have multi-column keys. Can CakePHP 2.1 make sense of it all? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Using Oracle
Watch, comment, and/or help with this ticket: http://cakephp.lighthouseapp.com/projects/42648/tickets/2232-oracle-11g-datasource-for-cakephp-20 -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Using Oracle
Thanks, stork. I've followed this little guide: http://www.hassanbakar.com/2012/01/09/using-oracle-in-cakephp-2-0/comment-page-1/#comment-38958 and could successfully migrate dbo_oracle.php from 1.3.15 to 2.1, allowing Cake's index.php to pass all its preliminary tests. Is it a bit early to be singing my praises? I'll be using nothing fancy, plain multi-table selects, simple updates, no deletes or inserts. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Using Oracle
Hi, folks. Can I use CakePHP 2.1.2 with Oracle database? I looked in Model/Datasource/Database/ there only seems to be support for Mysql, Postgres, Sqlite, Sqlserver. But working with an existing Oracle database is my job's requirement. I would be thankful for any tips. Thank you. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Problem with cakephp 1.3.8 + oracle with sequences
Hello Sorry for this newbie question but inside a controller I've have three continuous calls a oracle sequence nextval. for example: $opd = $this-Usuario-query(select pn_object_sequence.nextval from dual); pr($opd); $pid[1] = $opd['0']['0']['dual']; $opd = $this-Usuario-query(select pn_object_sequence.nextval from dual); pr($opd); $pid[2] = $opd['0']['0']['dual']; $opd = $this-Usuario-query(select pn_object_sequence.nextval from dual); pr($opd); $pid[3] = $opd['0']['0']['dual']; Well,the problem is shown by the pr : Array ( [0] = Array ( [0] = Array ( [dual] = 1146948 ) ) ) Array ( [0] = Array ( [0] = Array ( [dual] = 1146948 ) ) ) Array ( [0] = Array ( [0] = Array ( [dual] = 1146948 ) ) ) As you see I always take the first call value. I'm not sure if it is related to some cache or how can I avoid this because, I really need 'to pass' the sequence itself. Thank you in advance for your ideas. JB -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
CakePHP and Oracle redirecting problem
I just start an application with cakephp and oracle, it displayed that it can find database.php but also get 2 errors, they are related to redirecting. If i paste any controller name directly it shows me a blank page. Is there anyone can help me to find this solution? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: CakePHP and Oracle redirecting problem
On Jun 21, 2011, at 02:01, Ahsan Khan wrote: I just start an application with cakephp and oracle, it displayed that it can find database.php but also get 2 errors, they are related to redirecting. And what are those errors, specifically? If i paste any controller name directly it shows me a blank page. Set debug level to 2 to see what's actually happening. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: CakePHP and Oracle redirecting problem
My debug level is already 2 but nothing shows. On Jun 21, 1:10 pm, Ryan Schmidt google-2...@ryandesign.com wrote: On Jun 21, 2011, at 02:01, Ahsan Khan wrote: I just start an application with cakephp and oracle, it displayed that it can find database.php but also get 2 errors, they are related to redirecting. And what are those errors, specifically? If i paste any controller name directly it shows me a blank page. Set debug level to 2 to see what's actually happening. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Cakephp,Auth with Oracle connectivity
Hi, because you changed you alias, the results from the database are stored in a Mem hash instead of a User hash. You need to modify your views to reflect the change as well. Also, click on the notice, you will get more information as to where the error might have occured. Cheers, ojonam -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Cakephp,Auth with Oracle connectivity
Hi, this is because Oracle has a list of reserved keywords (like User) which make your query impossible to deal with for Oracle. The full list is available here : http://download.oracle.com/docs/cd/B10500_01/appdev.920/a42525/apb.htm. This means that you cannot use the term 'User' directly in a query. Your option is to create an alias for the user model. In the model/user.php file, add the following: class User extends AppModel { var $name = 'User'; var $alias = 'Mem'; Hope this helps! PS: your error is actually an Oracle SQL error. Try using SQLDeveloper or some other client to test these queries independently of cake. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Cakephp,Auth with Oracle connectivity
Nice to know that after such a long time someone is there to help... I will try this and will get back in case it works.. Regards Tapan Thapa On Mon, Apr 11, 2011 at 8:11 PM, ojonam manojo10...@gmail.com wrote: Hi, this is because Oracle has a list of reserved keywords (like User) which make your query impossible to deal with for Oracle. The full list is available here : http://download.oracle.com/docs/cd/B10500_01/appdev.920/a42525/apb.htm. This means that you cannot use the term 'User' directly in a query. Your option is to create an alias for the user model. In the model/user.php file, add the following: class User extends AppModel { var $name = 'User'; var $alias = 'Mem'; Hope this helps! PS: your error is actually an Oracle SQL error. Try using SQLDeveloper or some other client to test these queries independently of cake. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Cakephp,Auth with Oracle connectivity
Hello Manoj, I can confirm that after putting alias, i am able to login with oracle database. However in my login page after putting alias i am getting some notice and warning. *Notice* (8): Trying to get property of non-object [*CORE\cake\libs\view\helper.php*, line *458*] *Warning* (2): array_keys() expects parameter 1 to be array, null given [*CORE\cake\libs\view\helper.php*, line *458*] *Warning* (2): in_array() expects parameter 2 to be array, null given [*CORE\cake\libs\view\helper.php*, line *458*] Can you please suggest how to resolve this issue? Regards Tapan Thapa On Mon, Apr 11, 2011 at 8:33 PM, Tapan Kumar Thapa tapan.th...@hindustantimes.com wrote: Nice to know that after such a long time someone is there to help... I will try this and will get back in case it works.. Regards Tapan Thapa On Mon, Apr 11, 2011 at 8:11 PM, ojonam manojo10...@gmail.com wrote: Hi, this is because Oracle has a list of reserved keywords (like User) which make your query impossible to deal with for Oracle. The full list is available here : http://download.oracle.com/docs/cd/B10500_01/appdev.920/a42525/apb.htm. This means that you cannot use the term 'User' directly in a query. Your option is to create an alias for the user model. In the model/user.php file, add the following: class User extends AppModel { var $name = 'User'; var $alias = 'Mem'; Hope this helps! PS: your error is actually an Oracle SQL error. Try using SQLDeveloper or some other client to test these queries independently of cake. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Cakephp,Auth with Oracle connectivity
Hello Community, I am trying to integrating cakephp, auth and oracle. I have defined my connection string like below: var $default = array( 'driver' = 'oracle', 'persistent' = true, 'host' = 'x.x.x.x', 'login' = '', 'password' = '', 'database' = 'x.x.x.x:1521/JVD', 'prefix' = '', 'connect' = 'oci_connect' ); Cakephp shows that it is Cake is able to connect to the database. able to connect with database. Now while i am trying to login in my form via auth component, it shows below mentioned error. Query: SELECT User.id, User.username, User.password, User.email, User.first_name, User.last_name, User.created, User.modified FROM users User WHERE User.username = 'tapan' AND User.password = 'f5f7714b74b0f0f851830145b10b2a041959e281' Error: ORA-00923: FROM keyword not found where expected Can you please suggest what should i do to remove this issue? Regards Tapan Thapa -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Cakephp,Auth with Oracle connectivity
http://procsharp.blogspot.com/2011/04/connect-oracle-with-cakephp.html -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: CakePHP + Oracle : query other schema
Actually it seems to be working with a view. No need for a synonym. As long as the user you're connected with has granted rights on the tables you're guerying of course:) Sorry for not trying with a view earlier ! G. Selon Zaky Katalan-Ezra: Did you try to create a view for the synoname? On Mon, Mar 7, 2011 at 9:53 PM, guix69 g...@realguix.com mailto:g...@realguix.com wrote: Database is the same, only the schema is different. My database.php contains the settings to connect to SCHEMA1 but I would like to make a model to query data from SCHEMA2 I tried using a synonym (inside SCHEMA1, pointing to the desired table inside SCHEMA2) but it looks like the synonym is invisible to cake. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org http://tv.cakephp.org/ Check out the new CakePHP Questions site http://ask.cakephp.org http://ask.cakephp.org/ and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com mailto:cake-php%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
CakePHP + Oracle : query other schema
Hello, My app is configured via database.php to query a specific oracle schema. Is there a way to define a model for data stored in another schema? (or is there no other way than querying directly in SQL?) Thanks G. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: CakePHP + Oracle : query other schema
Use database linkhttp://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/statements_5005.htm On Mon, Mar 7, 2011 at 5:39 PM, guix69 g...@realguix.com wrote: Hello, My app is configured via database.php to query a specific oracle schema. Is there a way to define a model for data stored in another schema? (or is there no other way than querying directly in SQL?) Thanks G. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: CakePHP + Oracle : query other schema
Database is the same, only the schema is different. My database.php contains the settings to connect to SCHEMA1 but I would like to make a model to query data from SCHEMA2 I tried using a synonym (inside SCHEMA1, pointing to the desired table inside SCHEMA2) but it looks like the synonym is invisible to cake. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: CakePHP + Oracle : query other schema
Did you try to create a view for the synoname? On Mon, Mar 7, 2011 at 9:53 PM, guix69 g...@realguix.com wrote: Database is the same, only the schema is different. My database.php contains the settings to connect to SCHEMA1 but I would like to make a model to query data from SCHEMA2 I tried using a synonym (inside SCHEMA1, pointing to the desired table inside SCHEMA2) but it looks like the synonym is invisible to cake. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Conneect with Oracle
thanks so much ^^ I have check it and I can connect to oracle database ^^ I use configuration like this: 'driver' = 'oracle', 'connect'='oci_connect', 'persistent' = false, 'host' = 'localhost', 'port'=1521, 'login' = 'hr', 'password' = 'hr', 'database' = 'xe', 'prefix' = '', and check php_oci8 in PHP- PHP extensions Thank you again ^^ On 22 Tháng Hai, 23:04, Zaky Katalan-Ezra procsh...@gmail.com wrote: Linux? windows? Do you see OCI in phpinfo()? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Conneect with Oracle
thanks for your helping, but I dont know why it does not work on my project :( On 18 Tháng Hai, 21:35, ojonam manojo10...@gmail.com wrote: Hi, I had a few issues with the configuration as well. Try removing the host name and adding it as a prefix to the database field. Also, specify the 'connect' field. var $default = array( 'driver' = 'oracle', 'connect' = 'oci_connect', 'persistent' = false, 'host' = '', 'login' = 'hr' 'password' = 'hr', 'database' = 'localhost/xe', 'prefix' = '' ); Of course, this is assuming you have installed all the necessary drivers and packages for php to interact with oracle (try googling it in case you haven't). Cheers, ojonam On Feb 18, 1:16 pm, Nguyễn Trịnh Hồng Ngọc nthngoc...@gmail.com wrote: Hello everybody, I'm trying to make a connection between CakePHP and Oracle with configuration database: class DATABASE_CONFIG { var $default = array( 'driver' = 'oracle', 'persistent' = false, 'host' = 'localhost', 'login' = 'hr', 'password' = 'hr', 'database' = 'xe', 'prefix' = '', ); var $test = array( 'driver' = 'oracle', 'persistent' = false, 'host' = 'localhost', 'login' = 'hr', 'password' = 'hr', 'database' = 'xe', 'prefix' = '', );} and it work with the message: Your database configuration file is present. But I don't know why I can't get the data I have a table: posts(id,title,body), and Model class: post.php class Post extends AppModel{ var $name='Post';} controller: posts_controller.php class PostsController extends AppController{ var $name='Posts'; var $scaffold; } if you know, please help me, thanks a lot! Best regard! -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Conneect with Oracle
Linux? windows? Do you see OCI in phpinfo()? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Conneect with Oracle
This one should work: var $default = array('driver' = 'oracle', 'connect' = 'oci', 'persistent' = false, 'host' = 'localhost', 'port'=1521, 'login' = 'postsUser', 'password' = 'pass', 'schema'='post', //The Oracle slang for what mySql call database. 'database' = 'localhost:1521/xe', //All your application have this same line for localhost schemas 'prefix' = '' ); -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Conneect with Oracle
Hello everybody, I'm trying to make a connection between CakePHP and Oracle with configuration database: class DATABASE_CONFIG { var $default = array( 'driver' = 'oracle', 'persistent' = false, 'host' = 'localhost', 'login' = 'hr', 'password' = 'hr', 'database' = 'xe', 'prefix' = '', ); var $test = array( 'driver' = 'oracle', 'persistent' = false, 'host' = 'localhost', 'login' = 'hr', 'password' = 'hr', 'database' = 'xe', 'prefix' = '', ); } and it work with the message: Your database configuration file is present. But I don't know why I can't get the data I have a table: posts(id,title,body), and Model class: post.php class Post extends AppModel{ var $name='Post'; } controller: posts_controller.php class PostsController extends AppController{ var $name='Posts'; var $scaffold; } if you know, please help me, thanks a lot! Best regard! -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Conneect with Oracle
Hi, I had a few issues with the configuration as well. Try removing the host name and adding it as a prefix to the database field. Also, specify the 'connect' field. var $default = array( 'driver' = 'oracle', 'connect' = 'oci_connect', 'persistent' = false, 'host' = '', 'login' = 'hr' 'password' = 'hr', 'database' = 'localhost/xe', 'prefix' = '' ); Of course, this is assuming you have installed all the necessary drivers and packages for php to interact with oracle (try googling it in case you haven't). Cheers, ojonam On Feb 18, 1:16 pm, Nguyễn Trịnh Hồng Ngọc nthngoc...@gmail.com wrote: Hello everybody, I'm trying to make a connection between CakePHP and Oracle with configuration database: class DATABASE_CONFIG { var $default = array( 'driver' = 'oracle', 'persistent' = false, 'host' = 'localhost', 'login' = 'hr', 'password' = 'hr', 'database' = 'xe', 'prefix' = '', ); var $test = array( 'driver' = 'oracle', 'persistent' = false, 'host' = 'localhost', 'login' = 'hr', 'password' = 'hr', 'database' = 'xe', 'prefix' = '', );} and it work with the message: Your database configuration file is present. But I don't know why I can't get the data I have a table: posts(id,title,body), and Model class: post.php class Post extends AppModel{ var $name='Post';} controller: posts_controller.php class PostsController extends AppController{ var $name='Posts'; var $scaffold; } if you know, please help me, thanks a lot! Best regard! -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: oracle 10g connection with cakephp 1.3
Window XP. On 15 February 2011 12:24, Zaky Katalan-Ezra procsh...@gmail.com wrote: Windows/Linux? distribution? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php -- Best Reguards.. Taufiqul Islam Assistant Programmer Investment Corporation of Bangladesh 8-Rajuk Avenue, BDBL Bhaban, Dhaka-1000 13th floor (Computer Division), System Analysis Department E-mail : tosu...@gmail.com URL : www.icb.gov.bd |A CMMi Level 3 Certified Company| -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: oracle 10g connection with cakephp 1.3
I did it this way: Install xammp 1.enable extension=php_oci8.dll in php.ini 2.Set database.php var $default = array('driver' = 'oracle', 'connect' = 'oci', 'persistent' = false, 'host' = 'localhost', 'port'=1521, 'login' = 'user', 'password' = 'pass', 'schema'='mydb', 'database' = 'localhost:1521/xe', 'prefix' = '' ); I fail to bake anything so I baked with mysql and then change to Oracle connection On Tue, Feb 15, 2011 at 11:13 AM, Tosun or Shadin tosu...@gmail.com wrote: Window XP. On 15 February 2011 12:24, Zaky Katalan-Ezra procsh...@gmail.com wrote: Windows/Linux? distribution? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php -- Best Reguards.. Taufiqul Islam Assistant Programmer Investment Corporation of Bangladesh 8-Rajuk Avenue, BDBL Bhaban, Dhaka-1000 13th floor (Computer Division), System Analysis Department E-mail : tosu...@gmail.com URL : www.icb.gov.bd |A CMMi Level 3 Certified Company| -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php -- Regards, Zaky Katalan-Ezra QA Administrator www.IGeneriX.com Sites.IGeneriX.com 054-7762312 -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: oracle 10g connection with cakephp 1.3
and remember to use 'charset' key for oracle instead of 'encoding' if needed :( On Feb 15, 11:05 am, Zaky Katalan-Ezra procsh...@gmail.com wrote: I did it this way: Install xammp 1.enable extension=php_oci8.dll in php.ini 2.Set database.php var $default = array('driver' = 'oracle', 'connect' = 'oci', 'persistent' = false, 'host' = 'localhost', 'port'=1521, 'login' = 'user', 'password' = 'pass', 'schema'='mydb', 'database' = 'localhost:1521/xe', 'prefix' = '' ); I fail to bake anything so I baked with mysql and then change to Oracle connection On Tue, Feb 15, 2011 at 11:13 AM, Tosun or Shadin tosu...@gmail.com wrote: Window XP. On 15 February 2011 12:24, Zaky Katalan-Ezra procsh...@gmail.com wrote: Windows/Linux? distribution? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php -- Best Reguards.. Taufiqul Islam Assistant Programmer Investment Corporation of Bangladesh 8-Rajuk Avenue, BDBL Bhaban, Dhaka-1000 13th floor (Computer Division), System Analysis Department E-mail : tosu...@gmail.com URL :www.icb.gov.bd |A CMMi Level 3 Certified Company| -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php -- Regards, Zaky Katalan-Ezra QA Administratorwww.IGeneriX.com Sites.IGeneriX.com 054-7762312 -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
oracle 10g connection with cakephp 1.3
Hello, I new user of cakephp. I need help to connect oracle 10g release 2 with cakephp 1.3. can anyone please help me by describing the full procedure for establishing the connection. please, please do help, I am in great trouble. Thanks... -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: oracle 10g connection with cakephp 1.3
Windows/Linux? distribution? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
oracle connection with user prefix to tables
Hello all, I am starting a cakephp project which runs atop oracle (imposed, not willingly chosen). There are two user accounts, an ADMIN one (with read access), and a READER one. For accessing to a given table using the READER account, I need to refer to a table as ADMIN.table. In cake, if I set the prefix to 'ADMIN.', however, it doesn't work. I get a message saying that the table in question has not been found. Is there any other way to specify this? Cheers, Manohar Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
cake bake and oracle
Hello all, I'm trying to generate models for my oracle db using cake bake, but this is what I get: Welcome to CakePHP v1.3.6 Console --- App : app Path: /home/manojo/workspace/myapp/app --- Interactive Bake Shell --- [D]atabase Configuration [M]odel [V]iew [C]ontroller [P]roject [F]ixture [T]est case [Q]uit What would you like to Bake? (D/M/V/C/P/F/T/Q) m --- Bake Model Path: /home/manojo/workspace/myapp/app/models/ --- Use Database Config: (default/test) [default] (enter) man...@manojoport:~/workspace/myapp/app$ This happens even though my web page says I have been able to connect to the database (all green). I've seen a similar discussion at (http:// groups.google.com/group/cake-php/browse_thread/thread/c8e5130ae68d171f/ be914a0bd0bcf5f2?hl=enlnk=gstq=oracle+bake#), but there hasn't been any answer. Is there any progress on this? Thanks, ojonam Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Inserting Arabic data into Oracle DB
No, there is no particular reason for using query(), I am using it for testing only after the Cake's way failed. I wrote a plain PHP script and the problem still exist. On Dec 9, 3:09 am, cricket zijn.digi...@gmail.com wrote: 2010/12/8 osamo101 osamo...@gmail.com: In DATABASE_CONFIG I added the following line 'encoding' = 'UTF8' Are you sure that Oracle wants 'UTF8' and not something else (eg. 'utf-8', 'UTF-8', etc.)? and the insertion code is as follows $this-Activity-query(INSERT INTO TMSACTIVITIES(name, arabic_name) VALUES('some_name', 'خخخ')); Any particular reason for using query() instead of using Cake's way? Not that it's necessarily related. And, to cover all bases, you said that you created an ASP script to check the DB would accept it. Try a plain PHP script, also. Who knows? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Inserting Arabic data into Oracle DB
2010/12/9 osamo101 osamo...@gmail.com: No, there is no particular reason for using query(), I am using it for testing only after the Cake's way failed. I wrote a plain PHP script and the problem still exist. So it's not a Cake thing. I just did a quick google and saw that there seems to be some issue with Oracle, UTF-8, and PHP. See this link, for example: http://forums.oracle.com/forums/thread.jspa?messageID=1930036 I don't recall ever seeing anything about AL32UTF8 before. Another search shows quite a lot of links. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Inserting Arabic data into Oracle DB
Hi I am trying to insert Arabic characters into oracle db but i got question marks inserted instead, I mad sure that the db accepts Arabic characters, I created a sample ASP application and it inserted the Arabic characters correctly. Can you please help me, I spent more than two days in trying to fix this problem. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Inserting Arabic data into Oracle DB
On Dec 8, 2010, at 04:22, osamo101 wrote: I am trying to insert Arabic characters into oracle db but i got question marks inserted instead, I mad sure that the db accepts Arabic characters, I created a sample ASP application and it inserted the Arabic characters correctly. Can you please help me, I spent more than two days in trying to fix this problem. Show us the code you're using to try to insert the data. What character encoding is the data in? What character encoding is the database expecting? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Inserting Arabic data into Oracle DB
On Wed, Dec 8, 2010 at 5:22 AM, osamo101 osamo...@gmail.com wrote: Hi I am trying to insert Arabic characters into oracle db but i got question marks inserted instead, I mad sure that the db accepts Arabic characters, I created a sample ASP application and it inserted the Arabic characters correctly. Do you have the encoding set in database.php? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Inserting Arabic data into Oracle DB
In DATABASE_CONFIG I added the following line 'encoding' = 'UTF8' and the insertion code is as follows $this-Activity-query(INSERT INTO TMSACTIVITIES(name, arabic_name) VALUES('some_name', 'خخخ')); On Dec 8, 3:42 pm, Ryan Schmidt google-2...@ryandesign.com wrote: On Dec 8, 2010, at 04:22, osamo101 wrote: I am trying to insert Arabic characters into oracle db but i got question marks inserted instead, I mad sure that the db accepts Arabic characters, I created a sample ASP application and it inserted the Arabic characters correctly. Can you please help me, I spent more than two days in trying to fix this problem. Show us the code you're using to try to insert the data. What character encoding is the data in? What character encoding is the database expecting? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Inserting Arabic data into Oracle DB
On Dec 8, 2010, at 16:30, osamo101 wrote: In DATABASE_CONFIG I added the following line 'encoding' = 'UTF8' and the insertion code is as follows $this-Activity-query(INSERT INTO TMSACTIVITIES(name, arabic_name) VALUES('some_name', 'خخخ')); Is this PHP file also saved with UTF-8 encoding? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Inserting Arabic data into Oracle DB
Yes On Dec 9, 12:34 am, Ryan Schmidt google-2...@ryandesign.com wrote: On Dec 8, 2010, at 16:30, osamo101 wrote: In DATABASE_CONFIG I added the following line 'encoding' = 'UTF8' and the insertion code is as follows $this-Activity-query(INSERT INTO TMSACTIVITIES(name, arabic_name) VALUES('some_name', 'خخخ')); Is this PHP file also saved with UTF-8 encoding? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Inserting Arabic data into Oracle DB
2010/12/8 osamo101 osamo...@gmail.com: In DATABASE_CONFIG I added the following line 'encoding' = 'UTF8' Are you sure that Oracle wants 'UTF8' and not something else (eg. 'utf-8', 'UTF-8', etc.)? and the insertion code is as follows $this-Activity-query(INSERT INTO TMSACTIVITIES(name, arabic_name) VALUES('some_name', 'خخخ')); Any particular reason for using query() instead of using Cake's way? Not that it's necessarily related. And, to cover all bases, you said that you created an ASP script to check the DB would accept it. Try a plain PHP script, also. Who knows? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
bake and oracle issue
My cakephp app from the web works just fine. It can connect to DB and I can connect to my tables and fetch records. But the same database conf file doesn't work for bake. I'm getting Your database does not have any tables. with no other error messages. I have set the path variable and env vairbles as per screen cast. My OS is linux. Am I missing something or is this a known issue? Please let me know if there is a fix for this. thanks! Harry Welcome to CakePHP v1.3.4 Console --- App : app Path: /users/harry/mycake/app --- --- Bake View Path: /users/harry/mycake/app/views/ --- Use Database Config: (test/default) [default] Your database does not have any tables. My database.php file under app/config/ looks like this: var $test = array( 'driver' = 'oracle', 'persistent' = false, 'host' = 'myhost', 'login' = 'harry', 'password' = 'harry', 'database' = 'harrydb1', 'prefix' = 'APP_', ); var $default = array( 'driver' = 'oracle', 'persistent' = false, 'host' = 'myhost', 'port' = 1521, 'login' = 'harry', 'password' = 'harry', 'database' = 'harrydb1', 'prefix' = 'APP_', ); Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
ORACLE - missing database table
Hello everyone, i ran into some trouble when switching from mySQL to ORACLE. In mySQL i created the table names in lower case. Now after switching to ORACLE it's seems CAKE has some problems to find the tables inside ORACLE, table names also lower case. my dbconfig looks like: var $default = array( 'driver' = 'oracle', 'connect' = 'oci_connect', 'persistent' = false, 'host' = '', 'login' = 'user', 'password' = 'password', 'database' = 'host:port/XE', 'prefix' = '', ); ERROR: Warning (512): SQL Error: ORA-00936: Ausdruck fehlt [CORE\cake\libs \model\datasources\dbo_source.php, line 527] Query: SELECT FROM connection_settings ConnectionSetting WHERE 1 = 1 IMHO DECRIBE table to get column names for the SELECT doesn't work. any suggestion??? Florian Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: ORACLE - missing database table
On Jun 17, 5:24 am, Florian florian.end...@me.com wrote: Warning (512): SQL Error: ORA-00936: Ausdruck fehlt [CORE\cake\libs \model\datasources\dbo_source.php, line 527] Query: SELECT FROM connection_settings ConnectionSetting WHERE 1 = 1 Missing expression, not table. Search for ORA-00936, it is missing expression and it looks like it's missing something between SELECT and FROM (but I know little about Oracle so I'm guessing). Maybe the problem is with the DboOracle class. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Complex find() using Oracle
I've search this group and Google for a solution without any luck. I can read (SELECT) data, but cannot change this database at all. To get the data I run the following find: $this-find('all', array( 'fields' = array( 'ServiceData.stat_date', 'SUBSTR(ServiceData.stat_parameter,1,4) AS ServiceData.schema', 'SUBSTR(ServiceData.stat_parameter,19,2) AS ServiceData.state', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service1\', ServiceData.stat_value,0)) AS ServiceData.service1', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service2\', ServiceData.stat_value,0)) AS ServiceData.service2', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service3\', ServiceData.stat_value,0)) AS ServiceData.service3', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service4\', ServiceData.stat_value,0)) AS ServiceData.service4', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service5\', ServiceData.stat_value,0)) AS ServiceData.service5', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service6\', ServiceData.stat_value,0)) AS ServiceData.service6', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service7\', ServiceData.stat_value,0)) AS ServiceData.service7', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service8\', ServiceData.stat_value,0)) AS ServiceData.service8' ), 'conditions' = array( 'SUBSTR(ServiceData.stat_parameter, 5, 13)' = 'customer_lookup', 'SUBSTR(ServiceData.stat_parameter, 1, 4)' = $active_schema, 'ServiceData.stat_server LIKE' = 'PRODUCTION%', 'ServiceData.stat#' = 999, 'ServiceData.stat_date' = $load_date, ), 'group' = array( 'ServiceData.stat_date', 'SUBSTR(ServiceData.stat_parameter,1,4)', 'SUBSTR(ServiceData.stat_parameter,19,2)' ), 'order' = array('SUBSTR(ServiceData.stat_parameter,19,2)') ) ); This is the resulting query: SELECT ServiceData.stat_date , SUBSTR(ServiceData.stat_parameter,1,4) AS ServiceData.schema , SUBSTR(ServiceData.stat_parameter,19,2) AS ServiceData.state , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service1', ServiceData.stat_value,0)) AS ServiceData.service1 , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service2', ServiceData.stat_value,0)) AS ServiceData.service2 , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service3', ServiceData.stat_value,0)) AS ServiceData.service3 , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service4', ServiceData.stat_value,0)) AS ServiceData.service4 , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service5', ServiceData.stat_value,0)) AS ServiceData.service5 , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service6', ServiceData.stat_value,0)) AS ServiceData.service6 , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service7', ServiceData.stat_value,0)) AS ServiceData.service7 , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service8', ServiceData.stat_value,0)) AS ServiceData.service8 FROM SERVICE_DATA ServiceData WHERE SUBSTR(ServiceData.stat_parameter, 5, 13) = 'customer_lookup' AND SUBSTR(ServiceData.stat_parameter, 1, 4) = 'SCHEMA_A' AND ServiceData.stat_server LIKE 'PRODUCTION%' AND ServiceData.stat_number = 999 AND ServiceData.stat_date = TO_DATE('2010-02-17 09:00:02', '-MM- DD HH24:MI:SS') GROUP BY ServiceData.stat_date , SUBSTR(ServiceData.stat_parameter,1,4) , SUBSTR(ServiceData.stat_parameter,19,2) ORDER BY SUBSTR(ServiceData.stat_parameter,19,2) ASC This results in data returning in this form: array(43) { [0]= array(3) { [ServiceData]= array(4) { [stat_date]= string(19) 2010-02-17 09:00:02 [schema]= string(4) SCHEMA_A [state]= string(2) () [statvalue]= string(3) 116 } [SUM(DECODE(SUBSTR(ServiceData]= array(1) { [stat_parameter,22)]= string(3) 107 } [0]= array(3) { ['service1']= string(2) 40 ['service2']= string(3) 116 ['service3']= string(2) 17 } } } Notice the odd array keys SUM(DECODE(SUBSTR(ServiceData and 'service1' (this is the decode value in single ticks). Also the value to service1 is the value that belongs in service2, service2 has the value for service5, and service3 has the value for service8??? If I remove the SUM(DECODE(SUBSTR( fields, then everything works as expected: array(43) { [0]= array(1) { [ServiceData]= array(3) { [stat_date]= string(19) 2010-02-17 09:00:02 [schema]= string(4) SCHEMA_A [state]= string(2) () } } } I have tried the afterFind solution posted by TekNoid, but it did not work. http://teknoid.wordpress.com/2008/09/29/dealing-with-calculated-fields-in-cakephps-find/ Any hints or ideas on how I can overcome the issues of having such a complex SUM DECODE of a SUBSTR? Check out the new CakePHP Questions site http://cakeqs.org and help
Re: Complex find() using Oracle
CakePhp is not correctly parsing the alias for the decode fields, thats why you see decode... on array keys. Try using expression for fields. If that works, should also fix the data missmatch. Regards MARTIN On 02/18/2010 02:38 PM, TonyFugere wrote: I've search this group and Google for a solution without any luck. I can read (SELECT) data, but cannot change this database at all. To get the data I run the following find: $this-find('all', array( 'fields' = array( 'ServiceData.stat_date', 'SUBSTR(ServiceData.stat_parameter,1,4) AS ServiceData.schema', 'SUBSTR(ServiceData.stat_parameter,19,2) AS ServiceData.state', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service1\', ServiceData.stat_value,0)) AS ServiceData.service1', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service2\', ServiceData.stat_value,0)) AS ServiceData.service2', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service3\', ServiceData.stat_value,0)) AS ServiceData.service3', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service4\', ServiceData.stat_value,0)) AS ServiceData.service4', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service5\', ServiceData.stat_value,0)) AS ServiceData.service5', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service6\', ServiceData.stat_value,0)) AS ServiceData.service6', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service7\', ServiceData.stat_value,0)) AS ServiceData.service7', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service8\', ServiceData.stat_value,0)) AS ServiceData.service8' ), 'conditions' = array( 'SUBSTR(ServiceData.stat_parameter, 5, 13)' = 'customer_lookup', 'SUBSTR(ServiceData.stat_parameter, 1, 4)' = $active_schema, 'ServiceData.stat_server LIKE' = 'PRODUCTION%', 'ServiceData.stat#' = 999, 'ServiceData.stat_date' = $load_date, ), 'group' = array( 'ServiceData.stat_date', 'SUBSTR(ServiceData.stat_parameter,1,4)', 'SUBSTR(ServiceData.stat_parameter,19,2)' ), 'order' = array('SUBSTR(ServiceData.stat_parameter,19,2)') ) ); This is the resulting query: SELECT ServiceData.stat_date , SUBSTR(ServiceData.stat_parameter,1,4) AS ServiceData.schema , SUBSTR(ServiceData.stat_parameter,19,2) AS ServiceData.state , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service1', ServiceData.stat_value,0)) AS ServiceData.service1 , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service2', ServiceData.stat_value,0)) AS ServiceData.service2 , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service3', ServiceData.stat_value,0)) AS ServiceData.service3 , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service4', ServiceData.stat_value,0)) AS ServiceData.service4 , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service5', ServiceData.stat_value,0)) AS ServiceData.service5 , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service6', ServiceData.stat_value,0)) AS ServiceData.service6 , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service7', ServiceData.stat_value,0)) AS ServiceData.service7 , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service8', ServiceData.stat_value,0)) AS ServiceData.service8 FROM SERVICE_DATA ServiceData WHERE SUBSTR(ServiceData.stat_parameter, 5, 13) = 'customer_lookup' AND SUBSTR(ServiceData.stat_parameter, 1, 4) = 'SCHEMA_A' AND ServiceData.stat_server LIKE 'PRODUCTION%' AND ServiceData.stat_number = 999 AND ServiceData.stat_date = TO_DATE('2010-02-17 09:00:02', '-MM- DD HH24:MI:SS') GROUP BY ServiceData.stat_date , SUBSTR(ServiceData.stat_parameter,1,4) , SUBSTR(ServiceData.stat_parameter,19,2) ORDER BY SUBSTR(ServiceData.stat_parameter,19,2) ASC This results in data returning in this form: array(43) { [0]= array(3) { [ServiceData]= array(4) { [stat_date]= string(19) 2010-02-17 09:00:02 [schema]= string(4) SCHEMA_A [state]= string(2) () [statvalue]= string(3) 116 } [SUM(DECODE(SUBSTR(ServiceData]= array(1) { [stat_parameter,22)]= string(3) 107 } [0]= array(3) { ['service1']= string(2) 40 ['service2']= string(3) 116 ['service3']= string(2) 17 } } } Notice the odd array keys SUM(DECODE(SUBSTR(ServiceData and 'service1' (this is the decode value in single ticks). Also the value to service1 is the value that belongs in service2, service2 has the value for service5, and service3 has the value for service8??? If I remove the SUM(DECODE(SUBSTR( fields, then everything works as expected: array(43) { [0]= array(1) { [ServiceData]= array(3) { [stat_date]= string(19) 2010-02-17 09:00:02 [schema]= string(4) SCHEMA_A [state]= string(2)
Re: Complex find() using Oracle
I don't follow what you mean by Try using expression for fields. Can you clarify or give me an example? On Feb 18, 11:12 am, Martin Radosta martinrado...@gmail.com wrote: CakePhp is not correctly parsing the alias for the decode fields, thats why you see decode... on array keys. Try using expression for fields. If that works, should also fix the data missmatch. Regards MARTIN On 02/18/2010 02:38 PM, TonyFugere wrote: I've search this group and Google for a solution without any luck. I can read (SELECT) data, but cannot change this database at all. To get the data I run the following find: $this-find('all', array( 'fields' = array( 'ServiceData.stat_date', 'SUBSTR(ServiceData.stat_parameter,1,4) AS ServiceData.schema', 'SUBSTR(ServiceData.stat_parameter,19,2) AS ServiceData.state', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service1\', ServiceData.stat_value,0)) AS ServiceData.service1', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service2\', ServiceData.stat_value,0)) AS ServiceData.service2', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service3\', ServiceData.stat_value,0)) AS ServiceData.service3', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service4\', ServiceData.stat_value,0)) AS ServiceData.service4', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service5\', ServiceData.stat_value,0)) AS ServiceData.service5', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service6\', ServiceData.stat_value,0)) AS ServiceData.service6', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service7\', ServiceData.stat_value,0)) AS ServiceData.service7', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service8\', ServiceData.stat_value,0)) AS ServiceData.service8' ), 'conditions' = array( 'SUBSTR(ServiceData.stat_parameter, 5, 13)' = 'customer_lookup', 'SUBSTR(ServiceData.stat_parameter, 1, 4)' = $active_schema, 'ServiceData.stat_server LIKE' = 'PRODUCTION%', 'ServiceData.stat#' = 999, 'ServiceData.stat_date' = $load_date, ), 'group' = array( 'ServiceData.stat_date', 'SUBSTR(ServiceData.stat_parameter,1,4)', 'SUBSTR(ServiceData.stat_parameter,19,2)' ), 'order' = array('SUBSTR(ServiceData.stat_parameter,19,2)') ) ); This is the resulting query: SELECT ServiceData.stat_date , SUBSTR(ServiceData.stat_parameter,1,4) AS ServiceData.schema , SUBSTR(ServiceData.stat_parameter,19,2) AS ServiceData.state , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service1', ServiceData.stat_value,0)) AS ServiceData.service1 , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service2', ServiceData.stat_value,0)) AS ServiceData.service2 , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service3', ServiceData.stat_value,0)) AS ServiceData.service3 , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service4', ServiceData.stat_value,0)) AS ServiceData.service4 , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service5', ServiceData.stat_value,0)) AS ServiceData.service5 , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service6', ServiceData.stat_value,0)) AS ServiceData.service6 , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service7', ServiceData.stat_value,0)) AS ServiceData.service7 , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service8', ServiceData.stat_value,0)) AS ServiceData.service8 FROM SERVICE_DATA ServiceData WHERE SUBSTR(ServiceData.stat_parameter, 5, 13) = 'customer_lookup' AND SUBSTR(ServiceData.stat_parameter, 1, 4) = 'SCHEMA_A' AND ServiceData.stat_server LIKE 'PRODUCTION%' AND ServiceData.stat_number = 999 AND ServiceData.stat_date = TO_DATE('2010-02-17 09:00:02', '-MM- DD HH24:MI:SS') GROUP BY ServiceData.stat_date , SUBSTR(ServiceData.stat_parameter,1,4) , SUBSTR(ServiceData.stat_parameter,19,2) ORDER BY SUBSTR(ServiceData.stat_parameter,19,2) ASC This results in data returning in this form: array(43) { [0]= array(3) { [ServiceData]= array(4) { [stat_date]= string(19) 2010-02-17 09:00:02 [schema]= string(4) SCHEMA_A [state]= string(2) () [statvalue]= string(3) 116 } [SUM(DECODE(SUBSTR(ServiceData]= array(1) { [stat_parameter,22)]= string(3) 107 } [0]= array(3) { ['service1']= string(2) 40 ['service2']= string(3) 116 ['service3']= string(2) 17 } } } Notice the odd array keys SUM(DECODE(SUBSTR(ServiceData and 'service1' (this is the decode value in single ticks). Also the value to service1
Re: Complex find() using Oracle
Check the text case in this commit for an example: http://github.com/cakephp/cakephp1x/commit/02330b2d9c292110240c606e976e182c973897e9 let me know if that fix the problem, if not, you can prepare a test case and report the issue. On 02/18/2010 03:21 PM, TonyFugere wrote: I don't follow what you mean by Try using expression for fields. Can you clarify or give me an example? On Feb 18, 11:12 am, Martin Radostamartinrado...@gmail.com wrote: CakePhp is not correctly parsing the alias for the decode fields, thats why you see decode... on array keys. Try using expression for fields. If that works, should also fix the data missmatch. Regards MARTIN On 02/18/2010 02:38 PM, TonyFugere wrote: I've search this group and Google for a solution without any luck. I can read (SELECT) data, but cannot change this database at all. To get the data I run the following find: $this-find('all', array( 'fields' =array( 'ServiceData.stat_date', 'SUBSTR(ServiceData.stat_parameter,1,4) AS ServiceData.schema', 'SUBSTR(ServiceData.stat_parameter,19,2) AS ServiceData.state', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service1\', ServiceData.stat_value,0)) AS ServiceData.service1', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service2\', ServiceData.stat_value,0)) AS ServiceData.service2', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service3\', ServiceData.stat_value,0)) AS ServiceData.service3', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service4\', ServiceData.stat_value,0)) AS ServiceData.service4', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service5\', ServiceData.stat_value,0)) AS ServiceData.service5', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service6\', ServiceData.stat_value,0)) AS ServiceData.service6', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service7\', ServiceData.stat_value,0)) AS ServiceData.service7', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service8\', ServiceData.stat_value,0)) AS ServiceData.service8' ), 'conditions' =array( 'SUBSTR(ServiceData.stat_parameter, 5, 13)' = 'customer_lookup', 'SUBSTR(ServiceData.stat_parameter, 1, 4)' =$active_schema, 'ServiceData.stat_server LIKE' ='PRODUCTION%', 'ServiceData.stat#' =999, 'ServiceData.stat_date' =$load_date, ), 'group' =array( 'ServiceData.stat_date', 'SUBSTR(ServiceData.stat_parameter,1,4)', 'SUBSTR(ServiceData.stat_parameter,19,2)' ), 'order' =array('SUBSTR(ServiceData.stat_parameter,19,2)') ) ); This is the resulting query: SELECT ServiceData.stat_date , SUBSTR(ServiceData.stat_parameter,1,4) AS ServiceData.schema , SUBSTR(ServiceData.stat_parameter,19,2) AS ServiceData.state , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service1', ServiceData.stat_value,0)) AS ServiceData.service1 , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service2', ServiceData.stat_value,0)) AS ServiceData.service2 , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service3', ServiceData.stat_value,0)) AS ServiceData.service3 , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service4', ServiceData.stat_value,0)) AS ServiceData.service4 , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service5', ServiceData.stat_value,0)) AS ServiceData.service5 , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service6', ServiceData.stat_value,0)) AS ServiceData.service6 , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service7', ServiceData.stat_value,0)) AS ServiceData.service7 , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service8', ServiceData.stat_value,0)) AS ServiceData.service8 FROM SERVICE_DATA ServiceData WHERE SUBSTR(ServiceData.stat_parameter, 5, 13) = 'customer_lookup' AND SUBSTR(ServiceData.stat_parameter, 1, 4) = 'SCHEMA_A' AND ServiceData.stat_server LIKE 'PRODUCTION%' AND ServiceData.stat_number = 999 AND ServiceData.stat_date = TO_DATE('2010-02-17 09:00:02', '-MM- DD HH24:MI:SS') GROUP BY ServiceData.stat_date , SUBSTR(ServiceData.stat_parameter,1,4) , SUBSTR(ServiceData.stat_parameter,19,2) ORDER BY SUBSTR(ServiceData.stat_parameter,19,2) ASC This results in data returning in this form: array(43) { [0]= array(3) { [ServiceData]= array(4) { [stat_date]= string(19) 2010-02-17 09:00:02 [schema]= string(4) SCHEMA_A [state]= string(2) () [statvalue]= string(3) 116 } [SUM(DECODE(SUBSTR(ServiceData]= array(1) { [stat_parameter,22)]= string(3) 107 } [0]= array(3) { ['service1']= string(2) 40
Re: Complex find() using Oracle
It does not fix the problem. Am I doing it correctly? $dbo = $this-getDataSource(); $expression = $dbo-expression('SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service1\', ServiceData.stat_value,0)) AS ServiceData.service1'); $fields = array('ServiceData.stat_date', $expression); $this-find('all', array($fields,...etc, etc.) Still results in the ugly data. HOWEVER, I did notice the use of CASE WHEN statements in the test case. So, I switched my DECODE to CASE WHEN and it works as expected. I will draw up a test case and report the issue of DECODE failing to function properly. Thanks for your help Martin! -Tony On Thu, Feb 18, 2010 at 11:40 AM, Martin Radosta martinrado...@gmail.comwrote: Check the text case in this commit for an example: http://github.com/cakephp/cakephp1x/commit/02330b2d9c292110240c606e976e182c973897e9 let me know if that fix the problem, if not, you can prepare a test case and report the issue. On 02/18/2010 03:21 PM, TonyFugere wrote: I don't follow what you mean by Try using expression for fields. Can you clarify or give me an example? On Feb 18, 11:12 am, Martin Radostamartinrado...@gmail.com wrote: CakePhp is not correctly parsing the alias for the decode fields, thats why you see decode... on array keys. Try using expression for fields. If that works, should also fix the data missmatch. Regards MARTIN On 02/18/2010 02:38 PM, TonyFugere wrote: I've search this group and Google for a solution without any luck. I can read (SELECT) data, but cannot change this database at all. To get the data I run the following find: $this-find('all', array( 'fields' =array( 'ServiceData.stat_date', 'SUBSTR(ServiceData.stat_parameter,1,4) AS ServiceData.schema', 'SUBSTR(ServiceData.stat_parameter,19,2) AS ServiceData.state', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service1\', ServiceData.stat_value,0)) AS ServiceData.service1', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service2\', ServiceData.stat_value,0)) AS ServiceData.service2', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service3\', ServiceData.stat_value,0)) AS ServiceData.service3', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service4\', ServiceData.stat_value,0)) AS ServiceData.service4', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service5\', ServiceData.stat_value,0)) AS ServiceData.service5', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service6\', ServiceData.stat_value,0)) AS ServiceData.service6', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service7\', ServiceData.stat_value,0)) AS ServiceData.service7', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service8\', ServiceData.stat_value,0)) AS ServiceData.service8' ), 'conditions' =array( 'SUBSTR(ServiceData.stat_parameter, 5, 13)' = 'customer_lookup', 'SUBSTR(ServiceData.stat_parameter, 1, 4)' =$active_schema, 'ServiceData.stat_server LIKE' ='PRODUCTION%', 'ServiceData.stat#' =999, 'ServiceData.stat_date' =$load_date, ), 'group' =array( 'ServiceData.stat_date', 'SUBSTR(ServiceData.stat_parameter,1,4)', 'SUBSTR(ServiceData.stat_parameter,19,2)' ), 'order' =array('SUBSTR(ServiceData.stat_parameter,19,2)') ) ); This is the resulting query: SELECT ServiceData.stat_date , SUBSTR(ServiceData.stat_parameter,1,4) AS ServiceData.schema , SUBSTR(ServiceData.stat_parameter,19,2) AS ServiceData.state , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service1', ServiceData.stat_value,0)) AS ServiceData.service1 , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service2', ServiceData.stat_value,0)) AS ServiceData.service2 , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service3', ServiceData.stat_value,0)) AS ServiceData.service3 , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service4', ServiceData.stat_value,0)) AS ServiceData.service4 , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service5', ServiceData.stat_value,0)) AS ServiceData.service5 , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service6', ServiceData.stat_value,0)) AS ServiceData.service6 , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service7', ServiceData.stat_value,0)) AS ServiceData.service7 , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service8', ServiceData.stat_value,0)) AS ServiceData.service8 FROM SERVICE_DATA ServiceData WHERE SUBSTR(ServiceData.stat_parameter, 5, 13) = 'customer_lookup' AND SUBSTR(ServiceData.stat_parameter, 1, 4) = 'SCHEMA_A' AND ServiceData.stat_server LIKE 'PRODUCTION%' AND ServiceData.stat_number = 999 AND ServiceData.stat_date = TO_DATE('2010-02-17 09:00:02', '-MM- DD HH24:MI:SS') GROUP
Re: Complex find() using Oracle
I would only change: $this-find('all', array('fields' = $fields,...etc, etc.) Would be great if you post the test case (or even better, a patch) to avoid other people waste time with the same issue. Bye MARTIN On 02/18/2010 05:39 PM, Tony Fugere wrote: It does not fix the problem. Am I doing it correctly? $dbo = $this-getDataSource(); $expression = $dbo-expression('SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service1\', ServiceData.stat_value,0)) AS ServiceData.service1'); $fields = array('ServiceData.stat_date', $expression); $this-find('all', array($fields,...etc, etc.) Still results in the ugly data. HOWEVER, I did notice the use of CASE WHEN statements in the test case. So, I switched my DECODE to CASE WHEN and it works as expected. I will draw up a test case and report the issue of DECODE failing to function properly. Thanks for your help Martin! -Tony On Thu, Feb 18, 2010 at 11:40 AM, Martin Radosta martinrado...@gmail.com mailto:martinrado...@gmail.com wrote: Check the text case in this commit for an example: http://github.com/cakephp/cakephp1x/commit/02330b2d9c292110240c606e976e182c973897e9 let me know if that fix the problem, if not, you can prepare a test case and report the issue. On 02/18/2010 03:21 PM, TonyFugere wrote: I don't follow what you mean by Try using expression for fields. Can you clarify or give me an example? On Feb 18, 11:12 am, Martin Radostamartinrado...@gmail.com mailto:martinrado...@gmail.com wrote: CakePhp is not correctly parsing the alias for the decode fields, thats why you see decode... on array keys. Try using expression for fields. If that works, should also fix the data missmatch. Regards MARTIN On 02/18/2010 02:38 PM, TonyFugere wrote: I've search this group and Google for a solution without any luck. I can read (SELECT) data, but cannot change this database at all. To get the data I run the following find: $this-find('all', array( 'fields' =array( 'ServiceData.stat_date', 'SUBSTR(ServiceData.stat_parameter,1,4) AS ServiceData.schema', 'SUBSTR(ServiceData.stat_parameter,19,2) AS ServiceData.state', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service1\', ServiceData.stat_value,0)) AS ServiceData.service1', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service2\', ServiceData.stat_value,0)) AS ServiceData.service2', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service3\', ServiceData.stat_value,0)) AS ServiceData.service3', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service4\', ServiceData.stat_value,0)) AS ServiceData.service4', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service5\', ServiceData.stat_value,0)) AS ServiceData.service5', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service6\', ServiceData.stat_value,0)) AS ServiceData.service6', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service7\', ServiceData.stat_value,0)) AS ServiceData.service7', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service8\', ServiceData.stat_value,0)) AS ServiceData.service8' ), 'conditions' =array( 'SUBSTR(ServiceData.stat_parameter, 5, 13)' = 'customer_lookup', 'SUBSTR(ServiceData.stat_parameter, 1, 4)' = $active_schema, 'ServiceData.stat_server LIKE' ='PRODUCTION%', 'ServiceData.stat#' =999, 'ServiceData.stat_date' =$load_date, ), 'group' =array( 'ServiceData.stat_date', 'SUBSTR(ServiceData.stat_parameter,1,4)', 'SUBSTR(ServiceData.stat_parameter,19,2)' ), 'order' = array('SUBSTR(ServiceData.stat_parameter,19,2)') ) ); This is the resulting query:
Re: Complex find() using Oracle
Do I post those here? If so, here goes... I only have time for a quick test case /** * test that fields() will accept objects made from DboSource::expression * * @return void */ function testFieldsWithExpression() { $expression = $this-testDb-expression(SUM(DECODE(SUBSTR(Sample.id,1), '1', 1, 0)) AS \Sample.case_col\); $result = $this-testDb-fields($this-Model, null, array(id, $expression)); $expected = array( '`TestModel`.`id`', SUM(DECODE(SUBSTR(Sample.id,1), '1', 1, 0)) AS \Sample.case_col\ ); $this-assertEqual($result, $expected); } One could argue that I shouldn't be using DECODE anyways as it is Oracle SQL specific. If this app were to change databases, I would have to rewrite a lot of custom fields that don't have cross-platform SQL. Is that a valid argument IYO? On Thu, Feb 18, 2010 at 1:51 PM, Martin Radosta martinrado...@gmail.comwrote: I would only change: $this-find('all', array('fields' = $fields,...etc, etc.) Would be great if you post the test case (or even better, a patch) to avoid other people waste time with the same issue. Bye MARTIN On 02/18/2010 05:39 PM, Tony Fugere wrote: It does not fix the problem. Am I doing it correctly? $dbo = $this-getDataSource(); $expression = $dbo-expression('SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service1\', ServiceData.stat_value,0)) AS ServiceData.service1'); $fields = array('ServiceData.stat_date', $expression); $this-find('all', array($fields,...etc, etc.) Still results in the ugly data. HOWEVER, I did notice the use of CASE WHEN statements in the test case. So, I switched my DECODE to CASE WHEN and it works as expected. I will draw up a test case and report the issue of DECODE failing to function properly. Thanks for your help Martin! -Tony On Thu, Feb 18, 2010 at 11:40 AM, Martin Radosta martinrado...@gmail.comwrote: Check the text case in this commit for an example: http://github.com/cakephp/cakephp1x/commit/02330b2d9c292110240c606e976e182c973897e9 let me know if that fix the problem, if not, you can prepare a test case and report the issue. On 02/18/2010 03:21 PM, TonyFugere wrote: I don't follow what you mean by Try using expression for fields. Can you clarify or give me an example? On Feb 18, 11:12 am, Martin Radostamartinrado...@gmail.com wrote: CakePhp is not correctly parsing the alias for the decode fields, thats why you see decode... on array keys. Try using expression for fields. If that works, should also fix the data missmatch. Regards MARTIN On 02/18/2010 02:38 PM, TonyFugere wrote: I've search this group and Google for a solution without any luck. I can read (SELECT) data, but cannot change this database at all. To get the data I run the following find: $this-find('all', array( 'fields' =array( 'ServiceData.stat_date', 'SUBSTR(ServiceData.stat_parameter,1,4) AS ServiceData.schema', 'SUBSTR(ServiceData.stat_parameter,19,2) AS ServiceData.state', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service1\', ServiceData.stat_value,0)) AS ServiceData.service1', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service2\', ServiceData.stat_value,0)) AS ServiceData.service2', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service3\', ServiceData.stat_value,0)) AS ServiceData.service3', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service4\', ServiceData.stat_value,0)) AS ServiceData.service4', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service5\', ServiceData.stat_value,0)) AS ServiceData.service5', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service6\', ServiceData.stat_value,0)) AS ServiceData.service6', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service7\', ServiceData.stat_value,0)) AS ServiceData.service7', 'SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), \'service8\', ServiceData.stat_value,0)) AS ServiceData.service8' ), 'conditions' =array( 'SUBSTR(ServiceData.stat_parameter, 5, 13)' = 'customer_lookup', 'SUBSTR(ServiceData.stat_parameter, 1, 4)' =$active_schema, 'ServiceData.stat_server LIKE' ='PRODUCTION%', 'ServiceData.stat#' =999, 'ServiceData.stat_date' =$load_date, ), 'group' =array( 'ServiceData.stat_date', 'SUBSTR(ServiceData.stat_parameter,1,4)', 'SUBSTR(ServiceData.stat_parameter,19,2)' ), 'order' =array('SUBSTR(ServiceData.stat_parameter,19,2)') ) ); This is the resulting query: SELECT ServiceData.stat_date , SUBSTR(ServiceData.stat_parameter,1,4) AS ServiceData.schema , SUBSTR(ServiceData.stat_parameter,19,2) AS ServiceData.state , SUM(DECODE(SUBSTR(ServiceData.stat_parameter,22), 'service1
Re: MySQL takeover by Oracle - petition
Isn't it open source? Not the first time someone made a fork of it - including the original author. :) On Jan 4, 10:31 pm, Juan Luis Baptiste juan.bapti...@gmail.com wrote: On Mon, Jan 4, 2010 at 10:05 AM, hashmich hendrik.schm...@web.de wrote: Oracle is going to take over Sun Microsystems - who are the owner of the copyrights for MySQL. I think you can imagine, what's the meaning of MySQL being taken over by its direct commercial competitor. I think you are overreacting, have you read Oracle's public position on this ? I think not: http://www.marketwire.com/press-release/Oracle-Corporation-NASDAQ-ORC... basically it's a commitment to continue to develop and support MySQL and it's customers (including increasing RD budget of MySQL). Oracle has no reason to end MySQL, they fit perfectly in their portfolio to compete against MS SQL server in the SMB market. Oracle DB is too expensive for a SMB to buy it so it will never go there, that's why they need MySQL. IMO, those petitions and sites of save MySQL only spreads FUD which is not good. Have you browsed Oracle's website and research your self what is their position on this? take a look at this FAQ on Sun acquisition: http://www.oracle.com/us/sun/038563.pdf There is, at least for now, nothing to worry about. It's the same FUD and negative vibes that appeared when Sun bought MySQL. What happened? nothing... Juancho Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: MySQL takeover by Oracle - petition
Is it trustworthy? Oracle is not friendly to open source at all. They can kill MySQL just by delaying to fix bugs. MySQL development is rather open. It is quite opposite to Oracle style. I think you are overreacting, have you read Oracle's public position on this ? I think not: http://www.marketwire.com/press-release/Oracle-Corporation-NASDAQ-ORCL-109.html basically it's a commitment to continue to develop and support MySQL and it's customers (including increasing RD budget of MySQL). Oracle has no reason to end MySQL, they fit perfectly in their portfolio to compete against MS SQL server in the SMB market. Oracle DB is too expensive for a SMB to buy it so it will never go there, that's why they need MySQL. IMO, those petitions and sites of save MySQL only spreads FUD which is not good. Have you browsed Oracle's website and research your self what is their position on this? take a look at this FAQ on Sun acquisition: http://www.oracle.com/us/sun/038563.pdf There is, at least for now, nothing to worry about. It's the same FUD and negative vibes that appeared when Sun bought MySQL. What happened? nothing... Juancho Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: MySQL takeover by Oracle - petition
On Tue, Jan 5, 2010 at 9:15 AM, Dinh pcd...@gmail.com wrote: Is it trustworthy? Oracle is not friendly to open source at all. They can kill MySQL just by delaying to fix bugs. MySQL development is rather open. It is quite opposite to Oracle style. AFAIK it was one of the conditions imposed by US and the EU to approve the deal[1], so at least for the next five years they will have to continue to support MySQL. Also as I said, MySQL isn't competition to them, both are targeted to different markets. Their competition is MS SQL server and others, and MySQL will help them to compete in that market. Do you think Oracle will some day drop their prices up to the point that a SMB will be able to pay a license for it ? I don't think so. Probably they will overcharge for a MySQL support contract, but it's open source nature will make that other companies offer a cheaper support for it. And in the remote case that the petition manages to make Oracle sell off MySQL to comply withe EU terms, who will buy it ? who can guarantee that someone more evil, for example MS or IBM doesn't buy it ? that would be even worse. It would need to be bought by someone big but that doesn't already have a database, As I see it, while Oracle can make money from it they will continue to invest on it to improve it to make it a better competitor in markets where Oracle database can't go because of it's astronomic price. Probably the only thing that will not ever happen is that we will not see MySQL replacing Oracle someday, but that would not ever happen even if they still were a standalone company. [1] http://www.euractiv.com/en/infosociety/oracle-sun-offer-win-eu-approval/article-188311 Juancho Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: MySQL takeover by Oracle - petition
Also as I said, MySQL isn't competition to them, both are targeted to different markets. Five years ago, yes. But now, no. I worked both in finance and telecom industry and felt MySQL heat. Just take a look at BI, ERP and CRM world, you will see MySQL there already to some extent. Do you think Oracle will some day drop their prices up to the point that a SMB will be able to pay a license for it ? Oracle database is not a sole product owned by Oracle. As you may know, you can download and install Oracle database for free. Oracle 10g Express Edition was ever promoted as MySQL alternative. But moreover, Oracle is actually a big business application player. They offer a lot of solid products based on their own Oracle RDMS. Their competitors offer the same stack with or without Oracle database support. MySQL is an option. Now by making MySQL future uncertain, Oracle makes IT solution buyers think again about their competitors who promote MySQL as an option and the concept of no vendor lock-in. MySQL is not a direct threat to Oracle yet. But its ecosystem, such as ISVs, as I believe, makes Oracle feel some heat. And in the remote case that the petition manages to make Oracle sell off MySQL to comply withe EU terms, who will buy it ? who can guarantee that someone more evil, for example MS or IBM doesn't buy it ? that would be even worse. It would need to be bought by someone big but that doesn't already have a database, As I see it, while Oracle can make money from it they will continue to invest on it to improve it to make it a better competitor in markets where Oracle database can't go because of it's astronomic price. Probably the only thing that will not ever happen is that we will not see MySQL replacing Oracle someday, but that would not ever happen even if they still were a standalone company. [1] http://www.euractiv.com/en/infosociety/oracle-sun-offer-win-eu-approval/article-188311 Juancho Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: MySQL takeover by Oracle - petition
Isn't it nice to have a descent data layer like we do in cake. Granted it might be a few days work to switch from MySQL to something like PostgreSQL for a decent sized project. But you probably have a few years before we ever get to that point where we are forced to do so. Don't sweat the small stuff enjoy the process of change and growth. I've seen a lot of changes since the 1980's in computer science where everyone reacted like it was the end of the world. Very few would go back to work in that environment leaving behind the tools and technology we have today. Things change, if they change for the worse thats too bad because those things occasionally die off. But I guarantee that those things that don't change and remain stagnant definitely die. I really don't think we should have any fear about what the future of MySQL holds for us. Its new changes that we all have an opportunity to still contribute to. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
MySQL takeover by Oracle - petition
Hi to all, even if this is not cake-relevant, I think this may be of interest for all of you, who build applications based on a opensource database - and want to do so in future: Oracle is going to take over Sun Microsystems - who are the owner of the copyrights for MySQL. I think you can imagine, what's the meaning of MySQL being taken over by its direct commercial competitor. So just sign the petition: http://www.helpmysql.org/en/ Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: MySQL takeover by Oracle - petition
On Mon, Jan 4, 2010 at 10:05 AM, hashmich hendrik.schm...@web.de wrote: Oracle is going to take over Sun Microsystems - who are the owner of the copyrights for MySQL. I think you can imagine, what's the meaning of MySQL being taken over by its direct commercial competitor. I think you are overreacting, have you read Oracle's public position on this ? I think not: http://www.marketwire.com/press-release/Oracle-Corporation-NASDAQ-ORCL-109.html basically it's a commitment to continue to develop and support MySQL and it's customers (including increasing RD budget of MySQL). Oracle has no reason to end MySQL, they fit perfectly in their portfolio to compete against MS SQL server in the SMB market. Oracle DB is too expensive for a SMB to buy it so it will never go there, that's why they need MySQL. IMO, those petitions and sites of save MySQL only spreads FUD which is not good. Have you browsed Oracle's website and research your self what is their position on this? take a look at this FAQ on Sun acquisition: http://www.oracle.com/us/sun/038563.pdf There is, at least for now, nothing to worry about. It's the same FUD and negative vibes that appeared when Sun bought MySQL. What happened? nothing... Juancho Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: CakePHP and Oracle (status of compatibility)
I have previously written a class to manupulate oracle using php's oci (in projects without cake). So are you saying you wrote your own class, and are somehow using it in Cake? Or did you manipulate the existing dbo_oracle.php? -- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-...@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/cake-php?hl=.
Re: CakePHP and Oracle (status of compatibility)
I was unable to call Oracle function/procedure and bind IN and OUT variables. So I turned to PHP's oci extension. record join is supported well. On Nov 17, 7:36 pm, kemikTc yuribe...@gmail.com wrote: After using CakePHP and MySQL for a few project. I have a new project where I am forced to use Oracle. I am looking for feedback from anyone who has tried CakePHP and Oracle in the past. My main concerns would be - ability to use bind variable - record id insertion using sequences - reserved keywords - record joins This project is quite robust, and I will be including Auth and ACL components (which I was able to implement in MySQL) Any other potential issues you guys can mention would be great. -- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-...@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/cake-php?hl=.
CakePHP and Oracle (status of compatibility)
After using CakePHP and MySQL for a few project. I have a new project where I am forced to use Oracle. I am looking for feedback from anyone who has tried CakePHP and Oracle in the past. My main concerns would be - ability to use bind variable - record id insertion using sequences - reserved keywords - record joins This project is quite robust, and I will be including Auth and ACL components (which I was able to implement in MySQL) Any other potential issues you guys can mention would be great. -- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-...@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/cake-php?hl=.
Re: Oracle 10g
Maybe this example will help : http://liamgraham.wordpress.com/2007/04/19/using-oracle-with-cakephp-15-minute-blog-tutorial/ Google is such a nice tool :) On Mon, Sep 28, 2009 at 5:21 PM, osamo101 osamo...@gmail.com wrote: Hi I have a problem connecting to Oracle 10g database. When I put 'driver' = 'oracle', I got an error in the homepage so I changed it to ODBC but also I am not able to connect. My configuration is as follows: var $default = array( 'driver' = 'odbc', 'persistent' = false, 'host' = 'MyServer', 'login' = 'UserID', 'password' = 'Password', 'schema' = 'MySchema', 'database' = 'orcl', 'prefix' = '', 'encoding' ='' ); I am waiting for a solution from you. Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Oracle 10g
Hi I have a problem connecting to Oracle 10g database. When I put 'driver' = 'oracle', I got an error in the homepage so I changed it to ODBC but also I am not able to connect. My configuration is as follows: var $default = array( 'driver' = 'odbc', 'persistent' = false, 'host' = 'MyServer', 'login' = 'UserID', 'password' = 'Password', 'schema' = 'MySchema', 'database' = 'orcl', 'prefix' = '', 'encoding' ='' ); I am waiting for a solution from you. Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
[SOLVED] CakePHP and Oracle 11g issues
Hi everyone, I'm writing this post only as a resource for those that are trying to make CakePHP applications run over Oracle 11g. I noticed that dbo_oracle.php doesn't concatenate the host and port parameters to the third parameter on the ocilogon function (php.net/ ocilogon). The php.net page of this function warns that you should pass a string like this: host:port/database to the third parameter of the ocilogon function. But that doesn't happen on dbo_oracle.php, which passes the database name parameter as it comes from the configuration written in app/config/database.php. I've made the communication between then work, but i would like to leave this post as a further reference to everyone that run into troubles trying to make it work. []'s --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Oracle autoincrement : PROBLEM
Hi Xanax Try this http://bakery.cakephp.org/articles/view/increment-behavior Saluos! On Sep 4, 8:30 am, Xanax mammer...@gmail.com wrote: Hi, I have a BIG problem. There is no autoincrement option in Oracle like in MySQL. Apparently, with CakePHP and Oracle, people use sequences and triggers to bypass this. My problem : I can't use triggers on my database, it's forbidden by my company. And of course i don't want to replace all the model-save() methods by their corresponding SQL request. Do you know what would be a good solution for me ? Thanks in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Oracle autoincrement : PROBLEM
Hi, I have a BIG problem. There is no autoincrement option in Oracle like in MySQL. Apparently, with CakePHP and Oracle, people use sequences and triggers to bypass this. My problem : I can't use triggers on my database, it's forbidden by my company. And of course i don't want to replace all the model-save() methods by their corresponding SQL request. Do you know what would be a good solution for me ? Thanks in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Weird SQL requests with CakePHP on an Oracle DataBase ?!!
Hi everyone, I've transfered all my data from MySQL to an Oracle Database. It used to work very well with MySQL. Now, when i try to launch my application, i've got weird request. I respected all tablename conventions from the CakePHP sites so i've set plural tablenames. For examples for the table groups here is the sql request from CakePHP : SELECT Group.id, Group.name, Group.parent_id, Group.lft, Group.rght, Group.commentaires, Group.created, Group.modified FROM groups Group WHERE 1 = 1 ORDER BY Group.lft asc Notice that it don't use the plural of Group AND at the end, in the FROM, i've got the tablename two times.. I don't have any clue from where does it come and how can i fix this.:( Thanks in advance for any help --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Weird SQL requests with CakePHP on an Oracle DataBase ?!!
I'm not familiar with Oracle syntax. Does it normally leave out the AS when using an alias? If so, it looks ok to me. The table is groups and the alias is Group. On Thu, Aug 27, 2009 at 9:48 AM, Xanaxmammer...@gmail.com wrote: Hi everyone, I've transfered all my data from MySQL to an Oracle Database. It used to work very well with MySQL. Now, when i try to launch my application, i've got weird request. I respected all tablename conventions from the CakePHP sites so i've set plural tablenames. For examples for the table groups here is the sql request from CakePHP : SELECT Group.id, Group.name, Group.parent_id, Group.lft, Group.rght, Group.commentaires, Group.created, Group.modified FROM groups Group WHERE 1 = 1 ORDER BY Group.lft asc Notice that it don't use the plural of Group AND at the end, in the FROM, i've got the tablename two times.. I don't have any clue from where does it come and how can i fix this.:( Thanks in advance for any help --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Weird SQL requests with CakePHP on an Oracle DataBase ?!!
I found the reason : it's the alis GROUP. This is a keyword reserved by ORACLE database engine. How can i change the alias ? Perahps in the model of the table ? Another solution is to change the tablename so it will change the alias associated but i would have to change a lot of SQL request... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Connecting to ORACLE Database !
Hello, I've been developing my cakephp application with MySQL sor far and now i must migrate the database to an oracle one. I've created an oracle database and import the tables, everything wrked fine. Here an extract of the tsnames.ora entry concerning this databse : ORACLE_DPRO = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.50.114.21)(PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = DPRO11)) ) In my databse.php, i've set up this : var $default = array( 'driver' = 'oracle', 'persistent' = false, 'host' = '10.50.114.21', 'login' = 'AZIZM', 'password' = 'AZIZM', 'database' = 'DPRO11', 'encoding' = 'UTF-8', 'prefix' = '', ); Whe i go to the test, cakephp show that the databse config gile is present and then nothing else, i think it bugs when he try to verify the connection... : Release Notes for CakePHP 1.2.1.8004. Read the changelog Your tmp directory is writable. The FileEngine is being used for caching. To change the config edit APP/config/core.php Your database configuration file is present. Do you have any idea of what should be the problem ? Thanks in advande, me i have no clue... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Connecting to ORACLE Database !
Have you tried setting up the connection as in this thread: http://groups.google.com/group/cake-php/browse_thread/thread/48df05d640ce3276 It's possible you need the oci_connect and to use the database SID rather than the service name. David On Aug 24, 4:21 pm, Xanax mammer...@gmail.com wrote: Hello, I've been developing my cakephp application with MySQL sor far and now i must migrate the database to an oracle one. I've created an oracle database and import the tables, everything wrked fine. Here an extract of the tsnames.ora entry concerning this databse : ORACLE_DPRO = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.50.114.21)(PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = DPRO11)) ) In my databse.php, i've set up this : var $default = array( 'driver' = 'oracle', 'persistent' = false, 'host' = '10.50.114.21', 'login' = 'AZIZM', 'password' = 'AZIZM', 'database' = 'DPRO11', 'encoding' = 'UTF-8', 'prefix' = '', ); Whe i go to the test, cakephp show that the databse config gile is present and then nothing else, i think it bugs when he try to verify the connection... : Release Notes for CakePHP 1.2.1.8004. Read the changelog Your tmp directory is writable. The FileEngine is being used for caching. To change the config edit APP/config/core.php Your database configuration file is present. Do you have any idea of what should be the problem ? Thanks in advande, me i have no clue... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
oracle find()
Hi, i im trying to query a table from other users. is there a way to use the find() instead of doing a custom query. thanks pete WORKS $this-set('machines', $this-Machine-query(SELECT * FROM OCD.MACHINES)); ??? // not working because of the missing user OCD $this-set('machines', $this-Machine-find('all')); -- View this message in context: http://www.nabble.com/oracle-%22find%28%29%22-tp24711573p24711573.html Sent from the CakePHP mailing list archive at Nabble.com. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: oracle find()
Not sure how cake handles this, but maybe you can workaround this issue by creating a synonym in your cake schema to OCD.MACHINES? create synonym machines for ocd.machines / On Jul 29, 9:56 am, pete123456 lumot...@gmail.com wrote: Hi, i im trying to query a table from other users. is there a way to use the find() instead of doing a custom query. thanks pete WORKS $this-set('machines', $this-Machine-query(SELECT * FROM OCD.MACHINES)); ??? // not working because of the missing user OCD $this-set('machines', $this-Machine-find('all')); -- View this message in context:http://www.nabble.com/oracle-%22find%28%29%22-tp24711573p24711573.html Sent from the CakePHP mailing list archive at Nabble.com. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
getting data from another oracle database
How would one go about gathering information from an other oracle database? My application contains all the relevant information required except for a few tables i need to read from from another oracle database The user i'm using has read rights on that database. I know it's possible to do this through adding a db configuration and using this in the model with var $useDbConfig = 'alternate'; But i want to do this with something like var $useTable = 'otherDB.tabel'; but is says Missing Database Table. does anyone know if this is possible thx in advance! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: getting data from another oracle database
With cake ORM you can refer different databases by DB configs but not by table names as cake always properly escape it for sure. Why don't you like $useDbConfig way? On May 20, 6:25 pm, reuvers reuv...@gmail.com wrote: How would one go about gathering information from an other oracle database? My application contains all the relevant information required except for a few tables i need to read from from another oracle database The user i'm using has read rights on that database. I know it's possible to do this through adding a db configuration and using this in the model with var $useDbConfig = 'alternate'; But i want to do this with something like var $useTable = 'otherDB.tabel'; but is says Missing Database Table. does anyone know if this is possible thx in advance! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: getting data from another oracle database
reuvers, Here is how I did it and it was for Oracle and this type of functionality is ,imho, an edge case, so I had to hack up the dbo_oracle file. I have an application DB and dozens of target DBs(other physical servers). I have a table in the application DB that holds connection info to all the other target DBs. I dynamically load database settings using ConnectionManager and set the current one by overriding the __construct method within each model that resides on a different DB. Some caveats, you won't be able to join tables across the DBs. The way that errors are returned in cake, it only handles the last error for a single connection. Since I have to connect to dozens of DBs, I had to modify the error handling to basically return an array of connection handles = errors. But if you know in advance all of the DBs you need to connect to, you can define them in your database.php file and just override within the model file, which connection to use. humbao reuvers wrote: How would one go about gathering information from an other oracle database? My application contains all the relevant information required except for a few tables i need to read from from another oracle database The user i'm using has read rights on that database. I know it's possible to do this through adding a db configuration and using this in the model with var $useDbConfig = 'alternate'; But i want to do this with something like var $useTable = 'otherDB.tabel'; but is says Missing Database Table. does anyone know if this is possible thx in advance! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: getting data from another oracle database
But if you know in advance all of the DBs you need to connect to, you can define them in your database.php file and just override within the model file, which connection to use. It is not nessecary. DB config can be created on the fly and model can be switched to it also in runtime. Search this group for complete solutions. On May 21, 12:32 am, humbao hum...@gmail.com wrote: reuvers, Here is how I did it and it was for Oracle and this type of functionality is ,imho, an edge case, so I had to hack up the dbo_oracle file. I have an application DB and dozens of target DBs(other physical servers). I have a table in the application DB that holds connection info to all the other target DBs. I dynamically load database settings using ConnectionManager and set the current one by overriding the __construct method within each model that resides on a different DB. Some caveats, you won't be able to join tables across the DBs. The way that errors are returned in cake, it only handles the last error for a single connection. Since I have to connect to dozens of DBs, I had to modify the error handling to basically return an array of connection handles = errors. But if you know in advance all of the DBs you need to connect to, you can define them in your database.php file and just override within the model file, which connection to use. humbao reuvers wrote: How would one go about gathering information from an other oracle database? My application contains all the relevant information required except for a few tables i need to read from from another oracle database The user i'm using has read rights on that database. I know it's possible to do this through adding a db configuration and using this in the model with var $useDbConfig = 'alternate'; But i want to do this with something like var $useTable = 'otherDB.tabel'; but is says Missing Database Table. does anyone know if this is possible thx in advance! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Oracle Stored Procedures
Hello all! Does Cake support Oracle stored procedures? I found Ticket #3163 (2 years old) in trac but did not see anything in dbo_oracle... Is calling Oracle stored procedures that return a result set supported? Thanks! Shawn Trac: https://trac.cakephp.org/ticket/3163 Oracle stored procedures and PHP example: http://www.oracle.com/technology/pub/articles/oracle_php_cookbook/fuecks_sps.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Oracle group by bug
Hi, i try use a group by sql with a find('all') method in a oracle database configuration but didnt worked. I use the same $condition array with mysql with success. Does anyone knows anything about this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Oracle group by bug
On Feb 27, 4:09 pm, Germano germano.c...@gmail.com wrote: Hi, i try use a group by sql with a find('all') method in a oracle database configuration but didnt worked. I use the same $condition array with mysql with success. You need to post relevant information including any and all errors you are getting. You should consider using the 'group' option instead of the 'conditions' to put your grouping clause. For example: $this- ModelName-find('all', array('group' = 'Model.field', . )); where '' is your other find options. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: can't connect to oracle
There's no problem in my connection.. i have two directory in my htdocs for two version cakephp (rc1 rc 3). there're cakerc1 and cakerc3 in cakerc1, i've developed CRUD for oracle XE, and I've not found problem yet. But, with cakephp rc3, I've got error connection On Dec 15, 7:17 pm, Rob webwe...@gmail.com wrote: That is telling you that there is something wrong with your connectivity to the database. Is you DB running and on the default port ? Can you validate the connection using the cake console app ? Can you connect directly with a plain PHP connect ? $db_conn = oci_connect(hr, hr, //127.0.0.1/XE); On Dec 11, 6:54 pm, baranangsi...@gmail.com baranangsi...@gmail.com wrote: at first page : = Your database configuration file is present. Cake is NOT able to connect to the database. i've ever developed application with cake rc2 and oracle. Select, insert, update, delete is work normally. Now, I want to try cake rc3. But, at first page, i see this connection error. On Dec 11, 9:46 am, Rob webwe...@gmail.com wrote: What error are you seeing ? On Dec 11, 4:23 am, baranangsi...@gmail.com baranangsi...@gmail.com wrote: i try oracle driver in cake rc3..., but don't success. here is database.php : var $default = array( 'driver' = 'oracle', 'persistent' = false, 'host' = 'localhost', 'login' = 'hr', 'password' = 'hr', 'database' = 'XE', 'prefix' = '', ); but, in RC2 and RC1, there's no problem... thankx --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: can't connect to oracle
That is telling you that there is something wrong with your connectivity to the database. Is you DB running and on the default port ? Can you validate the connection using the cake console app ? Can you connect directly with a plain PHP connect ? $db_conn = oci_connect(hr, hr, //127.0.0.1/XE); On Dec 11, 6:54 pm, baranangsi...@gmail.com baranangsi...@gmail.com wrote: at first page : = Your database configuration file is present. Cake is NOT able to connect to the database. i've ever developed application with cake rc2 and oracle. Select, insert, update, delete is work normally. Now, I want to try cake rc3. But, at first page, i see this connection error. On Dec 11, 9:46 am, Rob webwe...@gmail.com wrote: What error are you seeing ? On Dec 11, 4:23 am, baranangsi...@gmail.com baranangsi...@gmail.com wrote: i try oracle driver in cake rc3..., but don't success. here is database.php : var $default = array( 'driver' = 'oracle', 'persistent' = false, 'host' = 'localhost', 'login' = 'hr', 'password' = 'hr', 'database' = 'XE', 'prefix' = '', ); but, in RC2 and RC1, there's no problem... thankx --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---