check how many commas the variable containing the query has between [i]select[/i


Posted on 16th Feb 2014 07:03 pm by admin

Hi...

iv made an sql table that contains id number - name of sql query and an sql query.
The problem is that the table contains very different querys.
Did you know?Explore Trending and Topic pages for more stories like this.

On the first page you choose a query from a drop down menu.
When this is done i check if the query contains date as a parametre. if yes a date picker is desplayed.
When a date is picked the report runs when submited.

i want the results of the query to be displayed in a html table and need help to figure out how many rows the sql query output needs.
For example
select firstname, lastname from users
needs two rows and
select firstname, lastname, birthdate from users
needs three rows.

my solution is maybe to check how many commas the variable containing the query has between select and from
any one know how this can be done in php or maybe have a simpler way of solving this?
No comments posted yet

Your Answer:

Login to answer
329 Like 14 Dislike
Previous forums Next forums
Other forums

calendar dates and hours compare problem
i have a calendar in wordpress, everything works great except that i can make 2 meetings at the same

FTP issues
Hi all,


I am currently facing some serious problems with a script and really need some ad

Help with captcha script needed
Hello,

I am working on a script where reCAPTCHA or a similar form of CAPTCHA will be used, f

output printing as hexadecmal... XD
Everything works except the calcem call for the totusold and totuprice. The out put shows up as hex.

how make 2 column in table with data tybe long row
hi every one

I want make in my table 2 column with data tybe long raw

how thi

How can I get my program to read a larger array ??
Hi:

I have this program that reads from an array to do calculations. The array are just t

dynamic table with forms
I have a table that is populated with mysql data and in teh first column there is a raido button tha

How do I send data using an html link
Hi

If I have
<a href="main_file.php">

How do I send data t

question about n
I was looking at some of the things you could do with php and one of the things I have tried is n.<

script is pulling more then they have....
I have this script for my game where they can change there race. This will cost them 2,500 points. H

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash