CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 limit characters in a field

Print topic Send  topic

Author Message
starter
Posted: 06/13/2005, 3:39 PM

Im trying to show a resume of the content of a field,... How can I show the first 10 characters, and add 3 periods (...) at the end?
mrachow


Posts: 509
Posted: 06/13/2005, 11:41 PM

If you are doing more of this stuff you have to dive a little bit into PHP and the Component Reference manual.
Look under 1.1 Refererencing Objects who to refer the controls on your web page.
Check the length of the content by strlen() and cut the string by left().
The three dots can be added by . (dot) the string concatenation operator of php.
_________________
Best regards,
Michael
View profile  Send private message
starter
Posted: 06/15/2005, 6:50 PM

You're absolutly right... I used to develop in .asp, but the company is moving to Linux, and Im somehow lost....

I downloaded the manual from php.net... you know where can I find a more "examples based" manual or tutorial...?
lwismanuel
Posted: 06/16/2005, 12:47 AM

The following links might be usefull:

http://www.phpnoise.com/tutorials/
http://www.zend.com/zend/tut/index.php
http://www.phpfreaks.com/tutorials.php

Enjoy!
mrachow


Posts: 509
Posted: 06/17/2005, 1:29 AM

Ahhh...
Component Reference is a CC Studio Manual.
_________________
Best regards,
Michael
View profile  Send private message
starter
Posted: 07/01/2005, 6:24 PM

I really tryed to implement this:
Quote :
If you are doing more of this stuff you have to dive a little bit into PHP and the Component Reference manual.


but its quite harder... can yo please be a litle more specific...

thanks in advance,
starter
Posted: 07/07/2005, 6:44 PM

I tried to implement the CCDLookup function, but it sends this error:

Fatal error: Call to a member function query() on a non-object in c:\wamp\www\newsiglophp\Common.php on line 357

this is my sentence, based in the CCS manual:

global $DBConnection1;
$news->resume->SetValue(CCDLookUp("details", "news", "", ccsInteger), $DBConnection1);

Please, I really need help implementing this..., thanks in advance
Nicole

Posts: 586
Posted: 07/08/2005, 4:42 AM

Hello,
Your code is incorrect. You can try this one
global $DBConnection1;
global $news;
$news->resume->SetValue(CCDLookUp("details", "news", "", $DBConnection1));

_________________
Regards,
Nicole
View profile  Send private message
Damian Hupfeld
Posted: 07/10/2005, 6:03 AM

Or try doing this...

global $var;
$ grid->label->SetValue(substr($grid->label->GetValue(),X, Y));
and just add your dots in the HTML of the page.

regards
Damian Hupfeld
http://www.nexthost.com.au/services.php






"starter" <starter@forum.codecharge> wrote in message
news:542cdda689d32c@news.codecharge.com...
>I tried to implement the CCDLookup function, but it sends this error:
>
> Fatal error: Call to a member function query() on a non-object in
> c:\wamp\www\newsiglophp\Common.php on line 357
>
> this is my sentence, based in the CCS manual:
>
> global $DBConnection1;
> $news->resume->SetValue(CCDLookUp("details", "news", "", ccsInteger),
> $DBConnection1);
>
> Please, I really need help implementing this..., thanks in advance
>
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.