Click to See Complete Forum and Search --> : Problem, don't understand error, Plz plz plz help


Nacirema
12-18-2006, 02:40 PM
Hi,

I have this SQL Query:

$sqlInit = "SELECT (substring(firstname,1,1) + substring(lastname,1,1)) as initials from bl_ress INNER JOIN BL_quot ON bl_ress.IDresscreatedby = BL_quot.idRessCreatedBy where BL_quot.idClient =" .$quotId;

$initials = $conn->execQuery($query);
return $initials;

How do I execute this query and put the the recordset in a variable?
I mean am I doing something wrong?

Because I got:
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:

This is how I call it and display the results:

"<td align='center'><nobr>".$quotDAO->getInitials($quot['IDQuotation'])."</nobr></td>" .

Nacirema
12-18-2006, 02:48 PM
and if change conn>execQuery to
conn>select()

then I get no error, but the output just says Array
it doesn't display the recordset, it just says array

anye reason why?

silmaril8n
12-18-2006, 04:59 PM
Use "var_dump($var);" on the array rather than "echo" and you should see its contents.