+ Post New Thread
Results 1 to 4 of 4
Coding Thread, Return the same row more then once in Coding and Web Development; Hello Everyone, Seasons Greetings.... Right i've got a SQL query which would should return the same row but multipule times, ...
  1. #1
    fawkers's Avatar
    Join Date
    Jun 2007
    Location
    Southend
    Posts
    193
    Thank Post
    32
    Thanked 22 Times in 21 Posts
    Blog Entries
    2
    Rep Power
    31

    Return the same row more then once

    Hello Everyone,

    Seasons Greetings....

    Right i've got a SQL query which would should return the same row but multipule times, however i only get the row returned once.

    How should I go about this?

    Thanks

    .Adam

  2. #2


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,688
    Thank Post
    352
    Thanked 794 Times in 714 Posts
    Rep Power
    346
    Without seeing the SQL query and an example from the database it's hard to tell...

  3. #3

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,403
    Thank Post
    637
    Thanked 961 Times in 661 Posts
    Blog Entries
    2
    Rep Power
    319
    Do you mean you think that the query you've constructed should return multiple rows as it is; or do you want to know how to make it return multiple rows? Either way, posting the query you have will help in responding

  4. #4
    fawkers's Avatar
    Join Date
    Jun 2007
    Location
    Southend
    Posts
    193
    Thank Post
    32
    Thanked 22 Times in 21 Posts
    Blog Entries
    2
    Rep Power
    31
    Code:
    SELECT SUM(`cost`)
    				FROM `costs`
    				WHERE `id` in (
    					SELECT `cost_id`
    					FROM `events`
    					WHERE `printer_id` = $printer_id
    				)
    webman should reconise the code (since its been added to his printmaster system :P )

    i've attached the full zip file with the database printmastertest.zip

    This should return the same row multipule times so I can sum up the cost from each row.
    Last edited by fawkers; 28th December 2010 at 09:13 PM.

SHARE:
+ Post New Thread

Similar Threads

  1. Lordy !! A Williams on the front row...
    By mattx in forum General Chat
    Replies: 4
    Last Post: 6th November 2010, 07:43 PM
  2. Tax Return..
    By RabbieBurns in forum AU General Chat
    Replies: 4
    Last Post: 21st July 2010, 02:14 PM
  3. Play HD .MKV Files in Front Row
    By FN-GM in forum Mac
    Replies: 13
    Last Post: 18th October 2009, 06:34 PM
  4. Microsoft in web photo racism row....
    By tech_guy in forum General Chat
    Replies: 7
    Last Post: 27th August 2009, 12:35 AM
  5. Front Row On Mac Mini
    By russdev in forum Mac
    Replies: 16
    Last Post: 3rd July 2008, 06:16 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •