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

Ariba 9r - SAP MM Integration
Hi experts,

The standard Ariba adapter for 9r creates a relationship between Cost Centers

How to read CSS message data
Hi,
I have a requirement here. When working as a Dev angel for multiple customers its really di

Retail terminologys not been altered after activing Retail System
Hi, All

After I active Retail System via TCode SWF5, the terms does not been changed, th

Character increment
Hi,

I am facing a scenario like above,but in my case i want to show up like Col A,Col B etc..

rdns with php
I am trying to build a script that will show all of the different domains that are hosted on the sam

IIS on 2003 anon access disabled issue
I have an IIS server that belongs to a domain, and anonymous access is turned off for all my sites.

output_buffering so rewrite
I'm planning to rewrite some of my scripts so they don't have to use output buffering to accomplish

Web Application Recipe
Hi Guys!

I am working with the Web Application recipes. I am currently working on the sen

Session login issue
I'm wondering how to fix a problem I'm having with a session-based login system

Say I go to h

DYNPRO_FIELD_CONVERSION
Hi gurus,

I got a dump when I run one of my program. the dump is described below:

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