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?
Help with ORDER BY
Hello. I would like to order by ascending States, then Cities, then Gyms in the following code, but I can't figure it out. If anyone could help, I would truly appreciated it! if(isset($countryid))
noob cURL help
I have a pretty basic form that I need to cURL post to a file in my includes folder (includes/login.inc.php). I have never used cURL and cant find any good tutorials online so you guys are my last
md5 is it unique
I know this is most likely one of many simple questions that can be found semi easily. But I'm pressed for time. I have searched google, php.net, etc. But it only tells me how to make md5 hashes. Ok
Parse Error Help
Hello, I got the parse error "Parse error: syntax error, unexpected ',' in register.php on line 21Heres the code:Code: <body
calculator
I can't figure out why this code doesn't work. No error messages. Page loads.Code: <?php # Script 3.9 - calculator.php$page_title = 'Widget Cost Calculator';include ('./header.html');function
Character Set Setup
Whats the best character set to use if you want every character to work, and also how do you make your files, mysql stuff, and all that set for the best character type..... got a check list i can
Page not Loading After Test
Hey AllIt seemed that an inlcude statement wasn't working for some reason, so I tried a more absolute file path:include("home/username/public_html/coding/scripts/carspecs.php")However this
image upload script not working with png
The basic process of this php code is to take the submitted file, convert it to a small JPG thumbnail and put it into one directory and save the original file into another, but it seems that when
Recode Abap Dynpro into Web Dynpro
Hi All,
Somebody hacked into my site and changed coding >>> URGENT HELP NEEDED <<<
I am not that much into programming , but somebody is hacking to my site and injecting some kind of iframes ... it happened to another site , but that wasn't that important for me, but now it has