Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. sql,query very urgent

sql,query very urgent

Scheduled Pinned Locked Moved Database
database
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rameshdontagani
    wrote on last edited by
    #1

    hi, in my database i have the two tables... 1)programs 2)reserved in the programs...two fields 1)program id 2)maxseats................these details wil be entered by admin in the reserved table two fileds ..1)PRogramid 2)status my requirement is .. i need the available seats..means if any body is intersted in any program...they wil select the program...then status becomes approved(1).. then i need the o/p as available seats ..means if any body selects the program...then the maxseats should be decremented by 1...o/p should be the remaing seats..

    J V 2 Replies Last reply
    0
    • R rameshdontagani

      hi, in my database i have the two tables... 1)programs 2)reserved in the programs...two fields 1)program id 2)maxseats................these details wil be entered by admin in the reserved table two fileds ..1)PRogramid 2)status my requirement is .. i need the available seats..means if any body is intersted in any program...they wil select the program...then status becomes approved(1).. then i need the o/p as available seats ..means if any body selects the program...then the maxseats should be decremented by 1...o/p should be the remaing seats..

      J Offline
      J Offline
      Joe 2
      wrote on last edited by
      #2

      I sincerely hope that you are not asking for code. Let us know what you've tried and where is that you got stuck with.

      beklo.com/rameshgoudd wrote:

      Subject:Re: sql,query very urgent

      I am afraid that you are going to be taken in for a chance. :~

      R 1 Reply Last reply
      0
      • J Joe 2

        I sincerely hope that you are not asking for code. Let us know what you've tried and where is that you got stuck with.

        beklo.com/rameshgoudd wrote:

        Subject:Re: sql,query very urgent

        I am afraid that you are going to be taken in for a chance. :~

        R Offline
        R Offline
        rameshdontagani
        wrote on last edited by
        #3

        hi, ' i need to count how many seats are filled up ..and how many seats are there at to be filled.. i am unable to write the query for this yyar

        V 1 Reply Last reply
        0
        • R rameshdontagani

          hi, ' i need to count how many seats are filled up ..and how many seats are there at to be filled.. i am unable to write the query for this yyar

          V Offline
          V Offline
          Vasudevan Deepak Kumar
          wrote on last edited by
          #4

          What prevents you from using a simple count(*) on the table with the where clause querying an appropriate approved status value? Have you tried it first?

          Vasudevan Deepak Kumar Personal Homepage
          Tech Gossips
          A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson

          1 Reply Last reply
          0
          • R rameshdontagani

            hi, in my database i have the two tables... 1)programs 2)reserved in the programs...two fields 1)program id 2)maxseats................these details wil be entered by admin in the reserved table two fileds ..1)PRogramid 2)status my requirement is .. i need the available seats..means if any body is intersted in any program...they wil select the program...then status becomes approved(1).. then i need the o/p as available seats ..means if any body selects the program...then the maxseats should be decremented by 1...o/p should be the remaing seats..

            V Offline
            V Offline
            Vasudevan Deepak Kumar
            wrote on last edited by
            #5

            beklo.com/rameshgoudd wrote:

            very urgent

            Please desist from using such words like 'Urgent' or 'Please help'. Read this first: http://www.codeproject.com/scrapbook/forumguidelines.asp[^]

            Vasudevan Deepak Kumar Personal Homepage
            Tech Gossips
            A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups