Postgres/PHP querying issue, deleting by 'cid'

Do you have questions regarding other database enginges (not MySQL) -- ask here!

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 1
Joined: Tue Oct 25, 2011 4:30 pm

Postgres/PHP querying issue, deleting by 'cid'

Postby RRT » Tue Oct 25, 2011 7:31 pm

I have a Postgres database and the way that I am querying through PHP is to use a similar syntax to:

Code: Select all

while ($line = pg_fetch_array($result, null, PGSQL_ASSOC)) {
    echo "<tr>\n";
    foreach ($line as $col_value) {
        echo "\t\t<td>$col_value</td><tr>\n";
    echo "\t</tr>\n";
echo "</table>\n";

This however, makes it nearly impossible to delete rows through the browser. The whole database "row" is being fetched as a "line" I believe. Can someone suggest a better way that I could do the same thing, but have more granularity in the individual data fields that exist within each row? I want to be able to delete rows based off their line #, which is stored in the database field of "cid".

Return to “Other Database Engines”

Who is online

Users browsing this forum: No registered users and 1 guest