Take a look at the titles in this site (revision project of my bigbands

An then, move up one folder, and hava look at the same on the current site:

To show the database-entries, I use code similar to this one:
--- snip ---

$query = "SELECT * FROM nyheter_view WHERE visframside = 't' ORDER BY
endradato DESC;"; // listar oppslag for framsida
$resultat = pg_query($dbtilkobling, $query);
if (!$resultat) {
$feilmelding .= $F1101;
include ($exit);

$num = pg_num_rows($resultat); // tilordnar antal rekker på spørringa viss
den blei vellukka

$i = 0;
while ($i<$num) {
$nyheter_id[$i] = pg_fetch_result($resultat, $i, "nyheter_id");
$tittel[$i] = pg_fetch_result($resultat, $i, "tittel");
$ingress[$i] = pg_fetch_result($resultat, $i, "ingress");
pg_free_result($resultat); // frigjer resultatet frå spørringa

$i = 0;
while ($i<$num) {
        if ($tittel[$i]){
        echo "<h3>".$tittel[$i]."</h3>\n";
        if ($ingress[$i]){
        echo "<p>".$ingress[$i]."<br>\n";

--- snip ---

But some of the returning strings like $tittel[$i] get "trimmed", and show
only first letter in the string stored in the actual database-cell. The
strange ting is tha $ingress[$i] returns the whole string... So the problems
seem to be in returning values from the column.

The code is copied from the script which queries the same table for the same
data on the second URL. So the data presented should be exactly the same.
I've had a similar problem while developing the current site, but then the
problem got solved, and I can't remeber if I did anything (I guess not). But
then it happened when I printed the result from the oid-query in the

Why do this happen? Is it an postgre-issue, or a php-issue? What can I do to
solve the problem?


PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to