From fc3fa76f979d77ddbad6010257130f9540ed6d3e Mon Sep 17 00:00:00 2001 From: hawk__ Date: Mon, 1 Aug 2011 21:05:30 +0000 Subject: [PATCH] Added special handling for latest term_id insertion retrieval git-svn-id: https://plugins.svn.wordpress.org/postgresql-for-wordpress/trunk@418060 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- pg4wp/driver_pgsql.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pg4wp/driver_pgsql.php b/pg4wp/driver_pgsql.php index 3959724..f14da05 100644 --- a/pg4wp/driver_pgsql.php +++ b/pg4wp/driver_pgsql.php @@ -368,8 +368,8 @@ if( in_array( $t, array( '_seq', $table_prefix.'term_relationships_seq'))) return 0; - if( $ins_field == '"cat_ID"' || $ins_field == 'rel_id') - $sql = "SELECT MAX($ins_field) FROM $ins_table"; + if( $ins_field == '"cat_ID"' || $ins_field == 'rel_id' || $ins_field == 'term_id') + $sql = "SELECT MAX($ins_field) FROM ".$tbls[0]; else $sql = "SELECT CURRVAL('$t')";