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

Need help/w Page: 1,2,3,4 function!
So I have this code im working on where it's ment to display seperate pages having 20 logs each
I

MS Access data into a html table
Hi everyone, I am quite a novice at php but I have created some helpful scripts that fetch data
f

batch file not building to webapps folder
Hello. I just started running Vista :P and can't seem to get my projects deployed. I found out how

Pls help with PHP
Pls can anyone direct me on how to create a user account for a customer. For example i want know if

From Header Showing 'Unkown' In Hotmail? Why?
Code: $to = $row_GetID['email_addr'].',sales@mywebaddress.co.uk';
$subject = 'Thank you for you

C++ API to Oracle dB
I need to perform a select command to the Oracle dB to obtain information from a table.
What libr

DELETE rows based on content
I have a link in my rows

$bit="http://bit.ly/abcd";
$query = mysql_query("D

ALV List Display to point to another report on Double Click
Hi,

I want my ALV List Display to point to another report on Double Click on its line ite

Help on query replacing the date
Hi Pals,

i want to replace the current date in a column to some value say C or D or any n

how to insert value
I am having file bookissueadd.php..... in which i am having tag

<td height="21&q

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