Re: looking for a variable

From: Date: Thu, 06 May 2004 18:26:41 +0000
Subject: Re: looking for a variable
References: 1 2 3  Groups: php.db 
Request: Send a blank email to php-db+get-34289@lists.php.net to get a copy of this message
From: "Robbie Staufer" <rstaufer@scd.ucar.edu> >> $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...

« previous php.db (#34289) next »