我如何获得phalcon中的最后一个插入ID?

时间:2019-06-28 01:07:24

标签: php mysql postgresql phalcon

我在Micro Phalcon框架中开发了一些代码,并使用PostgreSQL数据库。 我的代码中有一个INSERT查询,我需要在上一个查询中返回插入的ID。 在纯PHP中,我使用如下代码:

each()

此外,我在Phalcon文档中找不到与此有关的任何文档。 请帮我; 最好的问候。

var sum = 0;

/* Select all td with class, and that are visible */
$('td.price:visible').each(function() {

  /* Parse content of visible td with Number.parseInt */
  var value = Number.parseInt($(this).text());
  if (!Number.isNaN(value)) {
  
    /* If value is a number, add it to the total */
    sum += value
  }

});

/* Fix selector */
$('.result').text(sum);

0 个答案:

没有答案
相关问题