Home
FAQ
Documentation
Forum
Downloads
July 30, 2010, 10:08:22 am
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Common questions answered
here
!
Home
Help
Search
Login
Register
FacileForum
>
Technical Support
>
Basic Form Topics
>
Query List, How to make one column using 2 and 3 data.
Pages: [
1
]
Go Down
« previous
next »
Print
Author
Topic: Query List, How to make one column using 2 and 3 data. (Read 1440 times)
thekids
Newbie
Offline
Posts: 1
Query List, How to make one column using 2 and 3 data.
«
on:
August 12, 2009, 02:30:32 pm »
Dear All,
In db Mysql, i create table with several with colum,
----------
jos_staff
----------
id
name
bachelor
master
doctore
email
---------
if i have a data :
P51229, Thekids ; B.Sc [MIT] , M.Eng [Tohoku] , P.hD [MIT]
I create Query List with colum like this :
------------------------------------------------------------------------
| no | id | name | education |
------------------------------------------------------------------------
| 1 | P51229 | Thekids | B.Sc [MIT] , M.Eng [Tohoku] , P.hD [MIT] |
------------------------------------------------------------------------
How to make like this, exactly a column 'education'
thank you very much
thekids
Logged
fvds
Administrator
Living Legend
Offline
Posts: 2321
Re: Query List, How to make one column using 2 and 3 data.
«
Reply #1 on:
August 13, 2009, 05:29:34 am »
A simple approach:
In the querylist, create for education three columns where you put the bachelor, master and doctore va;ues. In the column name of bachelor you put the value "Education" and set the colspan to 3. That will give you three values (if in the database).
A more complicated approach:
You can access the $row from the querylist value. $row holds the current table row and can be accessed like $row->bachelor for the value of bachelor. You can concatenate the values of bachelor, master and doctore with this $row.
HTH
Logged
Fred
Please
read
the forum rules
first!
Please do not use PM for generic questions!
Visit me at
OverTheWeb
killerB
Newbie
Offline
Posts: 14
Re: Query List, How to make one column using 2 and 3 data.
«
Reply #2 on:
August 17, 2009, 06:06:20 pm »
To be a bit more precise put this code in the education column.
Code:
<?php
return
$row
->
bachelor
.
', '
.
$row
->
master
.
','
.
$row
->
doctore
;
?>
Hope that helps.
Logged
Pages: [
1
]
Go Up
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> Forum rules
=> General Discussion
=> Suggestions
=> Professional Services
-----------------------------
Technical Support
-----------------------------
=> Installation, Maintenance, Setup
=> Basic Form Topics
=> Scripting
===> Validate
===> Mail
===> Store & Retrieve
===> Redirection
=> Tutorials
===> Tagboard
=> Packages
===> Release Notes Manager
===> Disaster Help
===>
XTDRatings (linked forum)
===> Four-page Hotel Booking Form
===> Base64ImageConverter
===> Sample Calendar using JSCalendar
===> Boldee's package collection
=====> Basic Database Application
=====> Query list ordering
=====> Multi page form with confirm
=====> Complex database application
=====> Simple calculator
=====> Other Packages
===> Fvds's package collection
=====> SQL query to a CSV file
=====> Track logistics of purchases
=====> Image upload
=====> Function to download a file
===> Bitsqueezer's package collection
===> AndrewvanMarle's Packages
=> Hackers Corner
=> Quality
===> Confirmed
===> Rejected
===> Solved
=> German - Deutsch
=> Dutch - Nederlands
-----------------------------
Old Board Archive
-----------------------------
=> Announcements
=> General Questions
=> Installation
=> Form Design
=> Scripting
=> Your Package
Powered by SMF 1.1 RC3
|
SMF © 2001-2006, Lewis Media