Page 1 of 1

query to mysql with columns option

Posted: Tue Sep 07, 2010 5:04 pm
by peterhall
Hi guys. I'm trying to make a query toi mysql dbase im php, but withou success. My table have aroun 20 columns, i want to make a query with rows and columns option, eg:

table1:

col1-----col2-----col3-----col4-----col5-----col6
r1a------r1b------r1c-------r1d------r1e------r1f
r2a------r2b------r2c-------r2d------r2e------r2f
r3a------r3b------r3c-------r3d------r3e------r3f
r4a------r4b------r4c-------r4d------r4e------r4f
r5a------r5b------r5c-------r5d------r5e------r5f
r6a------r6b------r6c-------r6d------r6e------r6f
r7a------r7b------r7c-------r7d------r7e------r7f

and now, with 3 combo, (one for the columns and 2 for the rows in the 2 first columns), i want to choose the data to retrieve... how can I get this?? :oops:

tku

Re: query to mysql with columns option

Posted: Tue Sep 07, 2010 5:28 pm
by John Cartwright
You might want to rephrase your question, because I have no idea what you are asking for.

Re: query to mysql with columns option

Posted: Wed Sep 08, 2010 7:06 am
by peterhall
0k. i'll try to be more explicit.

i have one table with 30 columns. the first 5 columns is the primary keys of the table, the rest is the information.

what i want, is filter by the first 5 columns, date (one, two or between dates), name, address, etc., and the remain columns, i want to choose wich ones i want to display, col6, col8, col9 and col14.

is it clear like this? can u understand it now? :roll:

tku for ur help!!!

Re: query to mysql with columns option

Posted: Wed Sep 08, 2010 1:35 pm
by Jonah Bron
Read this tutorial, it'll probably help you.

http://www.w3schools.com/sql/sql_intro.asp