I have been working with a script I have inherited that uses the ADODB class.
I want to run a query that checks a record is unique across the primary key and date field in a MsSql DB before inserting, so I am using this function
to run this query
Which hopefully returns an empty recordset. But when I call
to confirm the count is zero the damn thing falls over with 'Fatal error: Call to a non undefined member function RecordCount() on a non object'.
The call works fine if a non empty recordset is returned.
I have written my own DB class because PEAR is awful and so is this idiotic ADODB by the looks of things.
Anybody familiar with this class who can point a way out.
I want to run a query that checks a record is unique across the primary key and date field in a MsSql DB before inserting, so I am using this function
Code:
ADODB::Execute()
Code:
SELECT 1 FROM table WHERE pk = 'code' AND eff_date = 'newdate'.
Code:
ADODB::RecordCount()
The call works fine if a non empty recordset is returned.
I have written my own DB class because PEAR is awful and so is this idiotic ADODB by the looks of things.
Anybody familiar with this class who can point a way out.
Comment