[PHP-DB] Reducing Strings to a certain length

2004-07-18 Thread Cole Ashcraft
How would you reduce a string to a specified length? Say reduce 600 to 60 or abc to ab? Is there a PHP function for this? Will I have to write my own code? Cole -- This message has been scanned for viruses and dangerous content by MailScanner on mail.ashcraftfamily.net, and is believed to be cl

Re: [PHP-DB] Not Like

2004-07-18 Thread Cole Ashcraft
On Sun, 2004-07-18 at 15:00, John W. Holmes wrote: > Cole S. Ashcraft wrote: > > > I am trying to figure out how to display something where the condition > > is not like im a MySQL query. The query is > > > >> select * from class where classID like '_00'order by classID; > > > > > > How would

Re: [PHP-DB] PHP use in Federal Govt

2004-07-16 Thread Cole Ashcraft
The National Weather Service (Department of Commerce) uses php for many of their needs. Their main page (http://weather.gov/index.php). All warning maps are either done by PHP or perl. > > On Fri, 16 Jul 2004, Galbreath, Mark A wrote: > > > Alls, > > > > My division at State is trying to get PHP

Re: [PHP-DB] Dropdown menus from DB query

2004-06-18 Thread Cole Ashcraft
's one quote in front, but there's none at the back. echo "; * * - Original Message - From: Cole Ashcraft <[EMAIL PROTECTED]> Date: Friday, June 18, 2004 9:23 am Subject: Re: [PHP-DB] Dropdown menus from DB query Thanks. I think I can work

Re: [PHP-DB] Re: Dropdown menus from DB query

2004-06-18 Thread Cole Ashcraft
;select id, name from names order by name asc'; $smarty->assign('names',$db->getAssoc($sql)); template {html_options options=$names} Cole Ashcraft wrote: How would you create a drop down menu from a database query? I have figured how to do it with one field, but how could it

Re: [PHP-DB] Dropdown menus from DB query

2004-06-17 Thread Cole Ashcraft
from table"; > > $result = mysql_query($query); > > while($array = mysql_fetch_array($result)) > { > echo "".$array["name"].""; > } > > echo ""; > > hth > > - Original Message - > From: "

[PHP-DB] Dropdown menus from DB query

2004-06-17 Thread Cole Ashcraft
How would you create a drop down menu from a database query? I have figured how to do it with one field, but how could it be done with a system where the value is different than the displayed value (ie. numerical code as the value, name displayed)? Thanks, Cole -- This message has been scanned