I have a sql table containing
id - query - query name
the first page contains a drop down menu of all the query names. When chosen the user is sent to a page that prints the result of the query in a html table.
Now i nees to find how many rows the table should have.
This counts how many rows i need in the table:
$parts=explode(' FROM ',$query);
$count=explode(",", $parts[0]);
$result=count($count);
But the problem is that here i explode by commas but the query also contains commas like this: substring (***,19,10) as Part1
My question is how do i count only commas outside these parenteses.
something like this:
$var=0;
start counting commas in parts[0],
when ( accures increase $var to 1,
if $var = 1 dont count commas,
but when ) accures set $var to 0,
and start counting again
The reason why im making it this way is that it's suppose to be possible to just add a query to the sql table no matter how many rows this query needs in output.
Any ideas?
VAT
how should I deal with VAT?if I have a product that costs £5.00 and VAT @ 17.5% (£0.875) the total cost of the product is £5.875.so how do people deal with VAT should I round up/down? are
parameter passing issue on function
Well I thought I had created a pretty slick web page, using ?page and $_GET to load pages which where really function calls.Here is a few lines that make up the menuCode:
WM transfer order: confirm different batch than proposed by system
Hi folks,
array help
Does anyone know how to require 10 text fields for individual grades and output class average? (10 pt grading scale)
php form help
Hey,I use a control file to set my meta tags and titlesHere's an exampleCode: <?phpswitch ($sheet_name) { case 'page-2'://The page that has $sheet_name equal to the case value, this is the
Text to picture Generator
Hello, i have found this script and it works really good^^ But i have one problem, i would like to change the font and font size. Is there anyone here that know what code i should edit/paste in
PHP SUBMIT
Code: <input name="doLogin" type="image" src="images/loginsubmit.jpg" id="doLogin3" value="Login">ON FIREFOX it works finebut on
C++ API to Oracle dB
I need to perform a select command to the Oracle dB to obtain information from a table.What libraries can I link into my project to make this work?I read about the OCI - but I cannot find any
form variables from database help.
Hi all,I would like to have a form that gives you options based on the results of an mysql query.My example is this, say I have a mysql row with the colum name points and the result is 5. How would I
Month String to Numeric?
Hi guys,Given a month as a string, is there a simple way to find the numeric representation of said month?I've used a switch statement but I'm wondring if there is a more elegant way of doing