Odd Problem Invoking PHP Method
-
I’m working on a new theme based on a theme that has worked well for years. But an odd problem has occurred. I issue a call to a method. The code after the call is exectued. But the method code itself doesn’t get executed. I added some echo and die statements to illustrate the problem. Here is the code involing te method:
echo "Calling getByDateOrder"; $donorfile->getByDateOrder($fdate); die("Called getByDateOrder");
Here is the invoked code:
public function getByDateOrder($fdate) { global wpdb$; die("getByDateOrder entered"); $query="SELECT * FROM ncrj_donors WHERE lgdate >= '$fdate' ORDER BY lgdate"; $this->qstring=$query; $this->qstring=$query; $wpdb->query($query) or die("getByDateOrder Failed"); $num=wpdb->num_rows; $this->i=0; $this->lmt=$num; if ($num==0) { return false; } $this->result=$wpdb->get_row($query) or die("Donor Query Failed"); $this->readIt(); return true; }
The code after the die statement shouldn’t matter.
But here is the result:
Calling getByDateOrderCalled getByDateOrder
I’ve never encountered a problem like this before. Has anyone else? any suggestions about how to debug?
-Bob Chatelle
Viewing 13 replies - 1 through 13 (of 13 total)
Viewing 13 replies - 1 through 13 (of 13 total)
- The topic ‘Odd Problem Invoking PHP Method’ is closed to new replies.