Results 1 to 5 of 5
  1. #1

    how to randomize the data

    I have a MySQL database, with some fields:
    userID, name, email, Approved

    I need to show a random data when Approved 'y'.

    here's my code :
    call OpenConn
    call OpenRs(RsContent,"select UserID,Name,Email, from MSUser where lower(UserID)='" & lcase(session("UserID")) & "' and upper(approved) = 'Y' order by rand() limit 1"
    call GetRowsRs(RsContent,DataContent,DataContentRow)
    call CloseRs(RsContent)
    call CloseConn

    But it didn't work.

    Maybe you guys can help me ?

  2. #2
    Join Date
    Jul 2003
    What errors are you getting? Have you printed the query before sending it to make sure its printing correctly?

    Are you sure you are connected to the server properly?
    In order to understand recursion, one must first understand recursion.
    If you feel like it, you can read my blog
    Signal > Noise

  3. #3
    Microsoft VBScript runtime error '800a000d'

    Type mismatch: 'OpenConn'

  4. #4
    Join Date
    Nov 2003
    It means you're trying to call the function 'OpenConn' but nothing is defined as 'OpenConn'.
    "An army of sheep led by a lion would defeat an army of lions led by a sheep"

  5. #5
    ignore it, I already solved my problem.

    Thanks for replying.

Posting Permissions

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