HighDots Forums  

PHP Cool Tricks Reference

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss PHP Cool Tricks Reference in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
David B
 
Posts: n/a

Default PHP Cool Tricks Reference - 07-17-2004 , 10:41 PM






Can anyone point me to a reference that shows various ways of displaying
MySQL data with PHP, like the following?:

Display only rows where each word in a particular column begins with B.
Display only words that END in a particular letter.
Display only words that contain combinations of letters, such as "angor."
Display only the first three letters of each word.
Change everything to lower case.
Change the first letters of every word except "and" and "the" to upper case.

I found a good reference a couple weeks ago, but I seem to have lost the
link.

Thanks.

Reply With Quote
  #2  
Old   
Craig
 
Posts: n/a

Default Re: PHP Cool Tricks Reference - 07-19-2004 , 12:46 AM






try this: http://www.devguru.com/home.asp

Craig


"David B" <david_blomstromDELETETHIS (AT) yahoo (DOT) com> wrote

Quote:
Can anyone point me to a reference that shows various ways of displaying
MySQL data with PHP, like the following?:

Display only rows where each word in a particular column begins with B.
Display only words that END in a particular letter.
Display only words that contain combinations of letters, such as "angor."
Display only the first three letters of each word.
Change everything to lower case.
Change the first letters of every word except "and" and "the" to upper
case.

I found a good reference a couple weeks ago, but I seem to have lost the
link.

Thanks.



Reply With Quote
  #3  
Old   
Michael Fesser
 
Posts: n/a

Default Re: PHP Cool Tricks Reference - 07-19-2004 , 10:41 AM



.oO(David B)

Quote:
Can anyone point me to a reference that shows various ways of displaying
MySQL data with PHP, like the following?:
Assuming you want to do this in your queries:

Quote:
Display only rows where each word in a particular column begins with B.
Display only words that END in a particular letter.
Display only words that contain combinations of letters, such as "angor."
.... WHERE yourField LIKE 'B%';
.... WHERE yourField LIKE '%B';
.... WHERE yourField LIKE '%angor.%';

Quote:
Display only the first three letters of each word.
Change everything to lower case.
Answered in my other reply.

Quote:
Change the first letters of every word except "and" and "the" to upper case.
I would do this in PHP, maybe something like

$text = strtr(ucwords($text), array('And ' => 'and ', 'The ' => 'the '));

HTH
Micha


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.