RE: [PHP-DB] Using strlen and substr to Shorten DB Results

2003-01-26 Thread John W. Holmes
> I have a script that I am working on that pulls info from a database: > > <-- Code --> > $getscname = mysql_query("SELECT * FROM subcat WHERE subcatid = > '$subcatid'") or die ("Couldn't get the info.".mysql_error()); > > while($sub_cat = mysql_fetch_array($getscname)){ > $s

Re: [PHP-DB] Using strlen and substr to Shorten DB Results

2003-01-26 Thread Jeffrey_N_Dyke
$sub_cat is an array so you can omit the pipe when you get to count ($sub_cat); with an if block. there my be an easier way though. hth Jeff "Jami"