By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,660 Members | 1,593 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,660 IT Pros & Developers. It's quick & easy.

retrive info from mysql to asp page

P: 1
HI this is the asp code from my page,
rightr now it only display quotes that i have filled from my quote page,
I wish it to display all the quotes , includes the one on my mysql that i hav esent to my mysql truth my email parser program.

so i have on my mysql Data in quote Table 10 or 20 quotes , but i only see the ones that came from quote page . any question call me at
516-376-4118


Expand|Select|Wrap|Line Numbers
  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
  2. <!--#include file="Connections/dbkon.asp" -->
  3. <%
  4. agent__MMColParam = Request.Cookies("id")
  5. if agent__MMColParam = "" then
  6. response.redirect("login.asp")
  7. End if 
  8. %>
  9. <%
  10. Dim agent
  11. Dim agent_numRows
  12.  
  13. Set agent = Server.CreateObject("ADODB.Recordset")
  14. agent.ActiveConnection = MM_dbkon_STRING
  15. agent.Source = "SELECT * FROM m3lgs10.brokers WHERE id = " + Replace(agent__MMColParam, "'", "''") + ""
  16. agent.CursorType = 0
  17. agent.CursorLocation = 2
  18. agent.LockType = 1
  19. agent.Open()
  20.  
  21. agent_numRows = 0
  22. %>
  23. <%
  24. Dim leads__MMColParam
  25. leads__MMColParam = "New Lead"
  26. If (Request("MM_EmptyValue") <> "") Then 
  27.   leads__MMColParam = Request("MM_EmptyValue")
  28. End If
  29. %>
  30. <%
  31. Dim leads__d2
  32. leads__d2 = "1"
  33. If (Date() <> "") Then 
  34.   leads__d2 = Date()
  35. End If
  36. %>
  37. <%
  38. Dim leads
  39. Dim leads_numRows
  40.  
  41. Set leads = Server.CreateObject("ADODB.Recordset")
  42. leads.ActiveConnection = MM_dbkon_STRING
  43. leads.Source = "SELECT *  FROM m3lgs10.quotes  WHERE stats = '" + Replace(leads__MMColParam, "'", "''") + "'"
  44. leads.CursorType = 0
  45. leads.CursorLocation = 2
  46. leads.LockType = 1
  47. leads.Open()
  48.  
  49. leads_numRows = 0
  50. %>
  51. <%
  52. Dim credit__MMColParam
  53. credit__MMColParam = "10"
  54. If (Request.Cookies("id") <> "") Then 
  55.   credit__MMColParam = Request.Cookies("id")
  56. End If
  57. %>
  58. <%
  59.  
  60.  
  61.  
  62. Set credit = Server.CreateObject("ADODB.Recordset")
  63. credit.ActiveConnection = MM_dbkon_STRING
  64. credit.Source = "SELECT * FROM m3lgs10.credits WHERE pid = '" + Replace(credit__MMColParam, "'", "''") + "'"
  65. credit.CursorType = 0
  66. credit.CursorLocation = 2
  67. credit.LockType = 1
  68. credit.Open()
  69.  
  70. credit_numRows = 10
  71. %>
  72. <%
  73. Dim Repeat1__numRows
  74. Dim Repeat1__index
  75.  
  76. Repeat1__numRows = -10
  77. Repeat1__index = 10
  78. leads_numRows = leads_numRows + Repeat1__numRows
  79. %>
Feb 23 '12 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.