Home » Performance » MySQL » Split one MySql table in more tables
Split one MySql table in more tables [message #3119] Sat, 24 May 2008 04:24 Go to next message
axheladini  is currently offline axheladini
Messages: 1
Registered: May 2008
Location: Macedonia
Junior Member
Hello ther i am trying to fix an MySql query problem but i can not fix this for some days, any help will be welcome.
The problem is this way.
I have an query that selects data from three tables and when i display them they are shown all in one table. All i want to do is to split this table in more tables based on the rows that have similar data.
this is my query:
$query1=mysql_query("SELECT tbltasks.taskid, tbltasks.campid, tbltasks.taskname, tbltasks.taskdate, tblemployee.Name, tblemployee.Surename, tblemployee.profession, tblemployee.foto, tblemployee.drivinglicense, tblemployee.bexh, tblemployee.medicalscreening, tblcamps.campname
FROM tbltasks, tblemployee, tblcamps
WHERE tbltasks.taskid = tblemployee.taskid
AND tbltasks.campid = tblcamps.campid ");

so i want to have different tables based on the tbltasks.taskid, every rows that have similar tbltasks.taskid to be shown in one table and sow on.

Please help?

this is the problem with image description:
http://img156.imageshack.us/img156/9186/qyeryfz8.gif
Re: Split one MySql table in more tables [message #3127 is a reply to message #3119 ] Tue, 27 May 2008 04:59 Go to previous message
avatar  is currently offline avatar
Messages: 6
Registered: May 2008
Location: UK
Junior Member
I'm not sure if I understood you correctly, but why won't you use two separate queries or 'group by'?

I assume you're displaying that info on a website - Don't really think you will be able to display it the way you want without changing the source code of the application.
Previous Topic:simple query occasionally stalls
Next Topic:no concurrent insert
Goto Forum:
  


Current Time: Fri Jul 10 06:06:44 EDT 2009

Total time taken to generate the page: 0.01026 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 2.7.7.
Copyright ©2001-2007 FUD Forum Bulletin Board Software

MySQL is a trademark of Sun Microsystems.
InnoDB is a trademark of Oracle Corp.

Percona Performance Forums are a service of Percona, Inc.
Not affiliated with Sun Microsystems or Oracle Corp.