Home » Open Source » Programming Interfaces » show incorrect result (win-server 2000 with apache server, oracle8i server, oci8)
show incorrect result [message #447593] Tue, 16 March 2010 05:17 Go to next message
ahoussam
Messages: 5
Registered: March 2010
Junior Member
hello
I used query to get data from oracle like this:

$nrows = oci_fetch_all($stid, $data_res, null, null, OCI_FETCHSTATEMENT_BY_ROW);

i used tow method to display this data such as:php, and php with smarty
first with php file:
foreach ($data_res as $col) { 
    echo "<tr>\n"; 
    foreach ($col as $item) { 
        echo "    <td>".($item !== null ? htmlspecialchars($item, ENT_QUOTES) : "&nbsp;")."</td>\n"; 
    } 
    echo "</tr>\n"; 
}

I got correct data display , no problems!
second with smarty file, I am passing data to the mStudent variable:
{section name=i start=0 loop=$mStudent} 
    <tr> 
    <td>{$mStudent[i].id}</td> 
    <td>{$mStudent[i].first_name}</td> 
    <td>{$mStudent[i].second_name}</td> 
    <td>{$mStudent[i].email}</td>    
    <td>{$mStudent[i].NOTE}</td>      
    </tr>

data characters appear in an illegible such as: attashed file

can any one resolve this problem?
thanks
Re: show incorrect result [message #447595 is a reply to message #447593] Tue, 16 March 2010 05:36 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I know nothing about methods you use, but the output reminds me of displaying certain information using fonts that do not support the underlying language.

For example: I don't have Japanese fonts installed on my computer, so when I browse web pages written in that language, all I get are those "rectangles" (the same as on your image).

Could that be the problem in your case too?
Re: show incorrect result [message #447608 is a reply to message #447593] Tue, 16 March 2010 08:04 Go to previous messageGo to next message
ahoussam
Messages: 5
Registered: March 2010
Junior Member
thank you very much
but, I got correct data in first case when i use php only without smarty file! attached image shows it
Re: show incorrect result [message #447610 is a reply to message #447608] Tue, 16 March 2010 08:13 Go to previous message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I'm sorry, I wouldn't know what is the reason, but - someone else might. Wait for another opinion!
Previous Topic: Problems with Bind Variables and Prepared Statements
Next Topic: Oracle SQL parallel query within PERL
Goto Forum:
  


Current Time: Sat Dec 21 20:49:38 CST 2024