Data fetch from database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ashwani2k
    New Member
    • Sep 2007
    • 2

    Data fetch from database

    Hello..

    i develope a web projects of horoscope or astrology(http://demo.reallianzb ussimart.com/allzodiac.aspx) , there is an 12 Zodiaz sign and all the data call on this page through the Database , in this page i there is an one sql query ---- (Select Top 1 col from colour order by newid(),Select Top 1 num from number order by newid() ,Select Top 1 days from day order by newid() )

    then all data call one by one change ..

    when the refresh the page the value of all zodiac is change that is wrong ,,,

    so what is the quary that one time in day the value off all zodiac is same next day the value has been change......... ............... ............... .....



    so please help me /...........

    tell what is the process to not data change when the page refresh

    Ashwnai
  • ashwani2k
    New Member
    • Sep 2007
    • 2

    #2
    Data fetch from database

    Hello
    1. I develop a project for Astrology
    2. there is an 12 zodiac.
    3. all the data came from database .
    4. The site is http://demo.reallianzb ussimart.com/allzodiac.aspx
    5. when the user refresh the page the value of all data or zodiac is change
    6. my query is no data change when the page refresh.
    7. In this page i put up the Query Select top 1 col from color order by newid().

    Plese help me
    Ashwani

    Comment

    • azimmer
      Recognized Expert New Member
      • Jul 2007
      • 200

      #3
      Originally posted by ashwani2k
      Hello
      1. I develop a project for Astrology
      2. there is an 12 zodiac.
      3. all the data came from database .
      4. The site is http://demo.reallianzb ussimart.com/allzodiac.aspx
      5. when the user refresh the page the value of all data or zodiac is change
      6. my query is no data change when the page refresh.
      7. In this page i put up the Query Select top 1 col from color order by newid().

      Plese help me
      Ashwani
      Ashwani, I don't really see your question but the "order by newid()" clause looks nonsense anyhow: normally one orders a table on some variable that is in the table not on newly generated nearly random numbers (except if you want a random row in which case you should use RAND()).

      Comment

      • debasisdas
        Recognized Expert Expert
        • Dec 2006
        • 8119

        #4
        i dont think u have implemented any logic ,it is showing things randomly.

        Comment

        • debasisdas
          Recognized Expert Expert
          • Dec 2006
          • 8119

          #5
          Both the threads of the user are merged for better management of the Forum.

          Comment

          Working...