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

Effort Estimation Template for Steady State Support
Hi Everyone,

Is there any SAP provided template/format for system change and enhancements

Mail form doesn't send Russian/Cyrillic characters correctly?
When someone enters foreign characters (like Cyrillic text, and Japanese/Chinese probably gives the

Typedef struct vs just struct
Anyone know the rationale for using typedef for structs when a struct is itself a typedef? I have s

why preg_match_all does not return the number of matches
My regex looks like

X[^x{4e00}-x{9fa5}]*Y

(where X and Y are two Chinese characters)

pageination not working right... coping images over 4 pages
Code: <?php //This code will obtain the required page number from the $_GET array. Note that

How to schedule the a job?
Hi,
I have prepared a task ( i.e. a procedure is prepare the file and send the same to con

textfield unchanged
hi,
i want my form to know whether its textbox is unchange or not.

if($textbox == 'unchang

Save data in input fields when they press "BACK BUTTON"
Hi, this is html form: And let's say they get a error "Please enter ur title must be more then

retrieving images from mysql database using php
So I've been trying to figure out how to store images in a mysql database, and as far as i can tell

Ignore html and bbcode?
I've created a function to limit the amount of text according to the amount of words.

However

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