Hi,
I've been trying to get CakePHP 1.2 (tried latest beta and nightly
SVN) working with Sybase 12.5. I can get the 'welcome' screen to
report successful connection to the database (after editing the
connection interface to include charsets), however when I try to query
the database I get an error message (see below for code and errors).
Does the Sybsae connection work yet - or is it still a work in
progress? If anyone has had any success with the using it could they
let me know if they did anything differently.
Lastly I am a newbie to Cake - so it's always possible that my code
below is wrong.
Any advice, hints or tips for getting this working would be most
appriecated,
Cheers,
Phil.
Warning (2): sybase_query() [function.sybase-query]: Sybase: Server
message: Incorrect syntax near the keyword 'DESC'.
(severity 15, procedure N/A) [CORECORE/libs/model/datasources/dbo/
dbo_sybase.php, line 124]
Warning (2): sybase_query() [function.sybase-query]: Sybase: Server
message: Incorrect syntax near the keyword 'FROM'.
(severity 15, procedure N/A) [CORECORE/libs/model/datasources/dbo/
dbo_sybase.php, line 124]
1 DESC Cycle 4
2 DESC Cycle 1
3 DESC Cycle 1
4 DESC Cycle 1
5 DESC Cycle 1
6 SELECT FROM Cycle AS Mycycle WHERE 1 = 1
3
My code is very simple and similar to the tutorial - however I don't
get to choose table names so I've had to work around this:
Model - mycycle.php:
class Mycycle extends AppModel
{
var $useTable = "Cycle";
}
Controller - mycycle_controller.php
class MycycleController extends AppController
{
function index()
{
$this->set('mycycles', $this->Mycycle->findall());
}
}
Viee - mycycle/index.thtml
<h1>Cycles</h1>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---