/    Sign up×
Community /Pin to ProfileBookmark

using memcached to save result sets..

I’m trying to use memcached to store the result sets of my DB calls, but it doesn’t seem to want to save the result set object that I’m using. I can get memcached working fine to store objects, strings, etc.. I just can’t seem to get it to save the result set data type that I’m using. The code is as follows..

[CODE]
$strquery = “SELECT name, date FROM object”;
$rs = $db->Execute($strquery);
$memcache->set(md5($strquery), $rs, false, 100);
$rs = $memcache->get(md5($strquery));
while(!$rs->EOF)
{
$name = $rs->Fields[‘name’]->Value;
$date = $rs->Fields[‘date’]->Value;

echo $name . “<BR>”;

$rs->MoveNext();
}
$rs->Close();
[/CODE]

Basically once is gets to the line “while(!$rs->EOF)”, it throws this error:

[QUOTE]

Fatal error: Uncaught exception ‘com_exception’ with message ‘this variant has no properties’

[/QUOTE]

I’m using the ADODB object for DB connection..

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @Bengaltgrs spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.22,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...