Re: [PHP-DB] looking for a variable
Thanks, Robbie John W. Holmes wrote: From: Robbie Staufer I supply those values. Data associated with them gets pulled out of the database and I need to format them so that the first one is displayed differently than the following ones. Oh... echo "CLM, CAM, CSIM, cpl5, POP"; ---John Holmes... -- -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* Robbie Staufer NCAR/SCD 1850 Table Mesa Dr. Rm. 42 Boulder, CO. 80305 (303) 497-1836
Re: [PHP-DB] looking for a variable
From: Robbie Staufer > I supply those values. Data associated with them > gets pulled out of the database and I need to format > them so that the first one is displayed differently than the > following ones. Oh... echo "CLM, CAM, CSIM, cpl5, POP"; ---John Holmes... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] looking for a variable
I supply those values. Data associated with them gets pulled out of the database and I need to format them so that the first one is displayed differently than the following ones. thanks, Robbie John W. Holmes wrote: From: "Robbie Staufer" <[EMAIL PROTECTED]> $result = mysql_query ("SELECT * FROM testdb WHERE Code_Name IN ('CLM', 'CAM', 'CSIM', 'cpl5', 'POP')",$connection) is there a php variable that holds the number of elements in the () after IN? I'm formatting the display in a browser window. I need the second and consecutive elements to be indented below the first one. Something like this: echo "element 0" foreach additional element echo "tab","element" Where are CLM, CAM, etc coming from? You're not going to get it from the query, plain and simple. You're writing the query, though, so those values have to come from somewhere. ---John Holmes... -- -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* Robbie Staufer NCAR/SCD 1850 Table Mesa Dr. Rm. 42 Boulder, CO. 80305 (303) 497-1836
Re: [PHP-DB] looking for a variable
From: "Robbie Staufer" <[EMAIL PROTECTED]> >> $result = mysql_query ("SELECT * FROM testdb WHERE Code_Name IN ('CLM', >> 'CAM', 'CSIM', 'cpl5', 'POP')",$connection) >> is there a php variable that holds the number of elements in the () >> after IN? > > I'm formatting the display in a browser window. I need the second and > consecutive elements to be indented below the first one. > Something like this: > echo "element 0" > foreach additional element > echo "tab","element" Where are CLM, CAM, etc coming from? You're not going to get it from the query, plain and simple. You're writing the query, though, so those values have to come from somewhere. ---John Holmes... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] looking for a variable
I'm formatting the display in a browser window. I need the second and consecutive elements to be indented below the first one. Something like this: echo "element 0" foreach additional element echo "tab","element" Thanks, Robbie Bruno Ferreira wrote: Robbie Staufer wrote: Hi, In a statement like: $result = mysql_query ("SELECT * FROM testdb WHERE Code_Name IN ('CLM', 'CAM', 'CSIM', 'cpl5', 'POP')",$connection) is there a php variable that holds the number of elements in the () after IN? No :\ What did you want to do with that number? Maybe there is some other way around Bruno Ferreira --- [This E-mail scanned for viruses by Declude Virus] -- -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* Robbie Staufer NCAR/SCD 1850 Table Mesa Dr. Rm. 42 Boulder, CO. 80305 (303) 497-1836 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] looking for a variable
Robbie Staufer wrote: Hi, In a statement like: $result = mysql_query ("SELECT * FROM testdb WHERE Code_Name IN ('CLM', 'CAM', 'CSIM', 'cpl5', 'POP')",$connection) is there a php variable that holds the number of elements in the () after IN? No :\ What did you want to do with that number? Maybe there is some other way around Bruno Ferreira --- [This E-mail scanned for viruses by Declude Virus] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] looking for a variable
Hi, In a statement like: $result = mysql_query ("SELECT * FROM testdb WHERE Code_Name IN ('CLM', 'CAM', 'CSIM', 'cpl5', 'POP')",$connection) is there a php variable that holds the number of elements in the () after IN? Thanks, Robbie -- -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* Robbie Staufer NCAR/SCD 1850 Table Mesa Dr. Rm. 42 Boulder, CO. 80305 (303) 497-1836 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php