Board index   FAQ   Search  
Register  Login
Board index php forum :: Database Other Database Engines

Postgres/PHP querying issue, deleting by 'cid'

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

Moderators: macek, egami, gesf

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".
RRT
New php-forum User
New php-forum User
 
Posts: 1
Joined: Tue Oct 25, 2011 4:30 pm

Return to Other Database Engines

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron