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?
Is this Safe or Unsafe?
Hi i made a few pages with lots of peoples help now i just want to know if they are safe or not can anyone help me?here are the codesRegisterCode: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML
COOIS - Saving Object Overview WIP Status layouts
COOIS - Would like to be able to save the layout of an Object Overview - WIP Status report. There is currently NO icons for "choose layout" , "export" or "views" available while in Object Overview.
PHP & Java
Hello,can PHP code be used inside java code?Code: <SCRIPT LANGUAGE="JavaScript">OpenWindow.document.write("<?php echo NotWorking;
query based on 2 conditions
I want to select if the doc_type is either s OR f but this doesn't work:Code: [Select]$query2 = "SELECT * FROM members WHERE doc_type='s' && doc_type= 'f' ORDER BY
Problem with passing variables
I'm not really a php programmer so I'm really struggling with this issue. I have a banner script that is supposed to send people to an affiliate site and pass the parameters along with it.For
url- go to webpage
i have an input text field and submit button.how do i make the url entered into the textfield go to that webpage?
$GPRMC and NMEA how to extract from report
Hi There,Im a little bi lost and not sure where to start with this one, ive got a small gps receiver which impolling over a serial connection, each time i poll the device i get a load of rubbish back
webpage with (simple) login & mysql-db
Hi all,What I was looking for before was a multi-user password manager, web-based! The offer of free or cheap tools of this kind is very pover. Or they are too complex (or too expensive)I'm not
Warning: session_start() [function.session-start]: Cann.....
hi, can someone help me with this? I keep getting this error....Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by ......I tried to upload my files
Perplexing problem showing a .jpg
Please disregard..........I figured it out