1.7.2016 13:53 tarihinde Adil İLHAN yazdı:
http://stackoverflow.com/questions/2944297/postgresql-function-for-last-inserted-id
--
Merhabalar,
Aşağıda güzel anlatılmış.
QSqlQuery query;
query.prepare("INSERT INTO rooms (coordinate) VALUES
(ST_SetSRID(ST_MakePoint(:lon, :lat), 4326)) returning id”);
query.bindValue(“:lon”, x);
query.bindValue(“:lat”, y);
uint roomsId = 0;
if(query.exec() && query.first())
roomsId = query.value(0).toUInt();
Qt ile kullanımı da böyleymiş...
--
Kolay gelsin,
Mucip:)
_______________________________________________
Linux-programlama mailing list
[email protected]
https://liste.linux.org.tr/mailman/listinfo/linux-programlama
Liste kurallari: http://liste.linux.org.tr/kurallar.php