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 I make the like

[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

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 5.0

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

2004-06-18 Thread Cole Ashcraft
, name from names order by name asc'; $smarty-assign('names',$db-getAssoc($sql)); template select name=name {html_options options=$names} /select 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 be done

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

2004-06-18 Thread Cole Ashcraft
in front, but there's none at the back. echo select name=\dropdown\; * * - 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 from this. Just

[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

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

2004-06-17 Thread Cole Ashcraft
; $result = mysql_query($query); while($array = mysql_fetch_array($result)) { echo option value=\.$array[code].\.$array[name]./option; } echo /select; hth - Original Message - From: Cole Ashcraft [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 18, 2004 7:50