Click here to Skip to main content
15,559,491 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
GeneralRe: Help debug a php function with database and JOIN query. Pin
djkee24-Nov-09 22:40
djkee24-Nov-09 22:40 
GeneralRe: Help debug a php function with database and JOIN query. Pin
fly90424-Nov-09 22:44
fly90424-Nov-09 22:44 
GeneralRe: Help debug a php function with database and JOIN query. Pin
djkee24-Nov-09 23:13
djkee24-Nov-09 23:13 
GeneralRe: Help debug a php function with database and JOIN query. Pin
fly90424-Nov-09 23:42
fly90424-Nov-09 23:42 
GeneralRe: Help debug a php function with database and JOIN query. [modified] Pin
djkee25-Nov-09 1:04
djkee25-Nov-09 1:04 
GeneralRe: Help debug a php function with database and JOIN query. Pin
fly90425-Nov-09 1:08
fly90425-Nov-09 1:08 
GeneralRe: Help debug a php function with database and JOIN query. [modified] Pin
djkee25-Nov-09 1:30
djkee25-Nov-09 1:30 
GeneralRe: Help debug a php function with database and JOIN query. Pin
cjoki25-Nov-09 11:29
cjoki25-Nov-09 11:29 
if I may...

your first warning is that your are missing the 2nd argument in your function am_getlatestscores, which is $sql. This warning is being called from called in /home/myusername/public_html/cache/%%45^45E^45E480CD%%index.tpl.php on line 36. Open this php script and go to line 36 and look at how the $sql argument is built and passed. Also count your arguments you have 5 listed, but only the last 3 have default values. So you MUST have at least 2 arguments in the function call.


The foreach is expecting an array to be passed, and it is not present.

the 2 common usages of foreach is:
foreach($myArray as $value)
{
echo "Val: ".$value."
";
}

...or...
foreach($myArray as $key=>$value)
{
echo "Key:".$key." Val: ".$value."
";
}

given an array of...
$myArray = array(a,b,c);

The first foreach will produce...
Val: a
Val: b
Val: c

The second foreach....
Key: 0 Val: a
Key: 1 Val: b
Key: 2 Val: c

So long story short, the value you have passed to your foreach is not an array.

looking back at your code...
$higharray = am_getlatestscores($db, 'none', 'list');				foreach ($higharray as $hhscore)

...try testing the $higharray variable...
It may be undefined, an empty string or FALSE.
QuestionImage uploads to server with php and mySQL Pin
wartotojas24-Nov-09 9:17
wartotojas24-Nov-09 9:17 
Questionpost data missing after php parses raw post to post variable Pin
cjoki24-Nov-09 8:34
cjoki24-Nov-09 8:34 
AnswerRe: post data missing after php parses raw post to post variable Pin
fly90424-Nov-09 10:04
fly90424-Nov-09 10:04 
GeneralRe: post data missing after php parses raw post to post variable Pin
cjoki24-Nov-09 11:01
cjoki24-Nov-09 11:01 
GeneralRe: post data missing after php parses raw post to post variable Pin
fly90424-Nov-09 11:14
fly90424-Nov-09 11:14 
GeneralRe: post data missing after php parses raw post to post variable Pin
Marc Firth24-Nov-09 23:46
Marc Firth24-Nov-09 23:46 
GeneralRe: post data missing after php parses raw post to post variable Pin
cjoki25-Nov-09 9:43
cjoki25-Nov-09 9:43 
GeneralRe: post data missing after php parses raw post to post variable Pin
Marc Firth25-Nov-09 23:20
Marc Firth25-Nov-09 23:20 
GeneralRe: post data missing after php parses raw post to post variable Pin
cjoki27-Nov-09 11:37
cjoki27-Nov-09 11:37 
QuestionProblem with Visual Cpp compiler Pin
Game-point23-Nov-09 19:10
Game-point23-Nov-09 19:10 
AnswerRe: Problem with Visual Cpp compiler Pin
Richard MacCutchan1-Dec-09 3:29
mveRichard MacCutchan1-Dec-09 3:29 
AnswerRe: Problem with Visual Cpp compiler Pin
LloydA11114-Jan-10 9:42
LloydA11114-Jan-10 9:42 
QuestionHelp with assigning variables to smarty template engine (php). Pin
djkee23-Nov-09 11:20
djkee23-Nov-09 11:20 
AnswerRe: Help with assigning variables to smarty template engine (php). Pin
fly90423-Nov-09 11:53
fly90423-Nov-09 11:53 
GeneralRe: Help with assigning variables to smarty template engine (php). Pin
djkee23-Nov-09 14:42
djkee23-Nov-09 14:42 
GeneralRe: Help with assigning variables to smarty template engine (php). Pin
fly90424-Nov-09 3:30
fly90424-Nov-09 3:30 
GeneralRe: Help with assigning variables to smarty template engine (php). Pin
djkee24-Nov-09 9:30
djkee24-Nov-09 9:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.