Announcement

Announcement Module
Collapse
No announcement yet.

Split one MySql table in more tables

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Split one MySql table in more tables

    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:

  • #2
    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.

    Comment

    Working...
    X