Personal tools
From wiki.swiftlytilting.com
Jump to: navigation, search

WinBinder Manual/db get next free id

Gets the next available id (current id + 1) in a table.

Syntax

int db_get_next_free_id(string tablename [, string idfield])

Arguments

  • tablename is the name of table to be examined.
  • idfield is the name of identifier field (column). Default is "id".

Result

The function returns the next available id (current id + 1) or NULL if an error occurs.

Example

// Get the the next free id in mytable

$id = db_get_next_free_id("mytable");

See also


Winbinder Projects