Delegate class trouble

A place for users and developers of the Xataface to discuss and receive support.

Delegate class trouble

Postby mikep » Thu Jun 04, 2009 9:12 am

Ok. So I have a table named Jobs in which the primary key is a column called Job_ID. I want this column to be the title for each record.

I created a delegate class in tables/Jobs named Jobs.php.

the contents of this file are:

<?
class tables_Jobs {
function getTitle(&$record){
return $record->val('Job_ID');
}
}
?>


Its mostly copied right out of the delegate classes tutorial in the documentation.

When I check my Jobs table from my web browser, I get a white screen with the following text in the upper left corner:

val('Job_ID'); } } ?>

Any ideas what I'm doing wrong? I am not very familiar with PHP.


Thanks,
Mike
mikep
 
Posts: 44
Joined: Fri Apr 24, 2009 2:21 pm

Postby shannah » Thu Jun 04, 2009 7:00 pm

Looks like your PHP has short tags turned off. Try changing your opening php tag to <?php instead of just <?
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby mikep » Fri Jun 05, 2009 6:18 am

Ok. Adding <?php did the trick. I enabled short open tags in my php.ini file but that didn't seem to work.

Thanks
mikep
 
Posts: 44
Joined: Fri Apr 24, 2009 2:21 pm

Postby shannah » Fri Jun 05, 2009 10:34 am

Did you restart your webserver after making the changes to your php.ini file?
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby mikep » Fri Jun 05, 2009 11:40 am

I believe so, but its possible that I didn't. I'll try again. In any case, its working when i add <?php so thanks a lot.


Mike
mikep
 
Posts: 44
Joined: Fri Apr 24, 2009 2:21 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 29 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved