Mombu the Php Forum

Go Back   Mombu the Php Forum > Php > function I created doesn't work
User Name
Password
REGISTER NOW! Mark Forums Read




Reply
1 8th November 03:50
m.ford
External User
 
Posts: 1
Default function I created doesn't work



return get_content(0, 0, $index1);

That's the only obvious error I can see -- I guess the query's returning zero rows for (12, 104, 'merchant').

There's a possible infinite recursion in there, though -- if there are *no* rows in the table with index1=merchant, this thing will just recurse crazily until it bombs. One way to prevent this would be:

elseif ($client_id!=0 || $form_id!=0)
{
return get_content(0, 0, $index1);
}
else
{
return NULL; // or FALSE, or some other error indicator
}

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
JG125, The Headingley Library,
James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@leedsmet.ac.uk
Tel: +44 113 812 4730 Fax: +44 113 812 3211


To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm
  Reply With Quote


 


Reply


Thread Tools
Display Modes




666