Can someone help stop my head ache! Im sure its very simple (it is with php).

I have run one query to get a users current cash

SQL = "SELECT * FROM money WHERE id='fred'
Set Recordset = Server.CreateObject("ADODB.Recordset")
Recordset.Open SQL,Connection
Recordset("cash")

This is correct and pulls the value I want, which is 10,000.

Now I try to make a new recordset, to pull another users current cash

newSQL = "SELECT * FROM money WHERE id='George'
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open newSQL,Connection
rs("cash")

Now this pulls the same value as the last recordset, 10,000. Which is wrong.

Recommended Answers

All 3 Replies

It's not possible unless George also has 10,000.

Maybe he got a loan from Fred?

Please review your code, you my have a typo on the second code, or george might have the same cash value with fred.

create a loop and query all records having 10,000 cash, then check if fred and goerge displays on the result

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.