Translation mistake

From: Date: Fri, 06 Nov 2009 13:01:01 +0000
Subject: Translation mistake
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-6391@lists.php.net to get a copy of this message
Hi! I was looking for some information about pg_fetch_obiect() and i am pretty sure, there are translation mistake. There is an example: $database = "store"; $db_conn = pg_connect("host=localhost port=5432 dbname=$database"); if (!$db_conn) { echo "Failed connecting to postgres database $database\n"; exit; } $qu = pg_query($db_conn, "SELECT * FROM books ORDER BY author"); while ($data = pg_fetch_object($qu)) { echo $data->author . " ("; echo $data->year . "): "; echo $data->title . "<br />"; } pg_free_result($qu); pg_close($db_conn); This example above is correct, but in polish version fragment of code with "while" loop has two different variables "dane" and "data" See example below: $baza = "magazyn"; $polaczenie = pg_connect("host=localhost port=5432 dbname=$baza"); if (!$polaczenie) { echo "Błąd połączenia do bazy PostgreSQL $baza\n"; exit; } $zap = pg_query($polaczenie, "SELECT * FROM ksiazki ORDER BY autor"); while ($dane = pg_fetch_object($zap)) { echo $data->autor . " ("; echo $data->rok . "): "; echo $data->tytul . "<br />"; } /* data has no result from "pg_fetch_object($zap)" so we will see nothing. */ pg_free_result($zap); pg_close($polaczenie);

« previous php.webmaster (#6391) next »