Re: Parsing Data, Table to Form
От
Gavin M. Roy
Тема
Re: Parsing Data, Table to Form
Дата
Msg-id
409E4D41.9090707@ehpg.net
Ответ на
Parsing Data, Table to Form (Yasmine Kedoo)
Список
Дерево обсуждения
Re: Parsing Data, Table to Form brew@theMode.com
Look at these functions in the php documentation:
pg_Query, pg_NumRows, pg_Fetch_Object, and pg_FreeResult
http://www.php.net/manual/en/ref.pgsql.php
Small example
$conn = pg_Connect("host=localhost dbname=test user=postgres");
$result = pg_Query($conn, "SELECT * FROM mytable ORDER BY id LIMIT 1
OFFSET 0;");
$rows = pg_NumRows($result);
if ( $rows == 0 )
echo "Sorry no data found.\n";
else {
$data = pg_Fetch_Object($result, 0);
pg_FreeResult($result);
echo "\n";
echo "Field 1: field1\">
\n";
echo "Field 2: field2\">
\n";
echo "Field 3: field3\">
\n";
echo "\n";
}
Yasmine Kedoo wrote:
> Hi.
>
> I have done a search on one of my PHP pages, and displayed the results
> in a table on another page.
>
> Then when a button is clicked, i want to be able to display the table
> information in editable form fields, so that the data may be altered
> and the database updated.
>
> Does anyone have any ideas how i may be able to carry this out? :-)
> It's the parsing the data that i am unable to do.
>
> Thanx Again
>
> Yaz
>
> _________________________________________________________________
> Use MSN Messenger to send music and pics to your friends
> http://www.msn.co.uk/messenger
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
В списке pgsql-php по дате отправления