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

Option box to change variable
Hello, i need help by making a script!

I need to write a file with option box, so a dropdown

Read from a text file after a specific word
Hi all.

I have a text file that looks like the one below.
I know how to open the text fi

Help with PHP and checkboxes
I am posting this for a friend of mine, i wrote a small script for her to process her form data to a

C - Reading a file into a byte array
Hi,

I'm trying to read a file into a byte array in C. I have to use C as this is for a loadru

Create or replace package is ending ORA-21700
Database 9.2.0., patch 8 (9.2.0.8.0).
I trying run
create or replace package ....etc.

selection tool on raster image
Hi!
I have to implement in my app a selection tool which lets users to select region of any shape

Join Query Help
Hi all,

I am having problems with the below code, which we shall call 'my first join query'!

Interpret Order
Hello all,

I'm wondering if I have this:

Code: $switch = array(
'one' =>

COde for a Cc
I'm not receiving $ft as a Cc. Why is that??

$to = "$email";
$headers = "Fr

split string
Hi all

i have some names (imploded by comma):
Code: toronto,paris,madrid
Now, i would

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