Displaying 13 results from an estimated 13 matches for "last_insert_id".
2005 Dec 26
3
data insertion in multiple tables
I have two tables like:
Table A:
id (autoincrement)
name
Table B
id
id_of_A
desc
I want to add a record to table A and based on the id of A, I want to add a
record to table B.
I don''t think there is any SQL command that support this (at least in MySQL
4.1, so I use LAST_INSERT_ID()).
(Is there any other way? or MySQL 5 support any special SQL command?)
But I need this functionality to start my project.
Does Active Record support this functionality? or any other way to walk
around?
Or do I have to choose other databases than MySQL?
________________________________________...
2011 Jan 26
1
Return variables from func_odbc calls?
...ly perusing the source
code, but the long and short of it is that I cannot seem to find any
reference to variables set by func_odbc calls such as something that
would indicate if a query worked so that I can (in the dialplan)
handle errors on the fly. Another item I'm trying to determine is the
LAST_INSERT_ID...
Thoughts/Comments? I hope very much that I haven't overlooked
something, but then again I'm no longer a spring chicken either....
2006 Jan 05
3
has_one :dependent => true question
...d.
It seems like the only way to do this is to save the Account object then
save the User object. Is there a best practices way of doing this?
Essentially the sql you want to spit out is:
start transaction;
insert into accounts (...) values (...);
insert into users (account_id, ...) values (last_insert_id(), ...);
commit;
Thanks,
Zack
2006 Jun 26
8
id of last element in a table
Hi,
I would like to figure out how to determine what the id of the last
element in a table is. Is there an equivalent to the Table.find() method
which will tell me the number of elements in a table? also, maybe more
importantly, where are the available methods on tables documented?
What i am trying to do is to increment the id and work through a table
and check whether the id i am currently
2010 Jan 27
2
RMySQL - Bulk loading data and creating FK links
..."contact", dat, append=TRUE, row.names=FALSE)
But I then need to get all the PK's which this dbWriteTable() appended
to the contact table so I can load the data into my an_contact link
table. I don't want to issue a separate INSERT query for each row in dat
and then use MySQLs LAST_INSERT_ID() function....not when I have
3.5million rows to insert!
Any pointers welcome,
Nathan
--
--------------------------------------------------------
Dr. Nathan S. Watson-Haigh
OCE Post Doctoral Fellow
CSIRO Livestock Industries
University Drive
Townsville, QLD 4810
Australia
Tel: +61 (0)7 4753 85...
2010 Aug 17
1
MySQL Connect problem...
...exten => s,n,MYSQL(Query NORESULT ${DB1} INSERT\ INTO\ recordings\
(caller_number\,called_number\,date_created\,date_started\,in_use\,server_id)\
VALUES\ (\'${CALLERID(number)}\'\,\'${ARG1}\'\,NOW()\,NOW()\,\'Yes\'\,12))
exten => s,n,MYSQL(Query RESULT1 ${DB1} SELECT\ LAST_INSERT_ID())
exten => s,n,MYSQL(Fetch FOUND1 ${RESULT1} VALUE1)
exten => s,n,MYSQL(Clear ${RESULT1})
exten => s,n,MYSQL(Disconnect ${DB1})
exten => s,n,MixMonitor(${VALUE1}.wav)
exten => s,n,Set(CALLERID(all)=xxx)
exten => s,n,Dial(SIP/prov1/${ARG1})
in a macro to dial numbers...
Every fe...
2016 May 09
0
Asterisk 13.9.0 Now Available
...is release:
-----------------------------------
* ASTERISK-25963 - func_odbc requires reconnect checks for stale
connections (Reported by Ross Beer)
* ASTERISK-25970 - Segfault in pjsip_url_compare (Reported by
Dmitriy Serov)
* ASTERISK-25938 - res_odbc: MySQL/MariaDB statement
LAST_INSERT_ID() always returns zero. (Reported by Edwin
Vandamme)
* ASTERISK-25927 - Removed option "registertrying" is still
documented in sip.conf.sample (Reported by Etienne Lessard)
* ASTERISK-25947 - Protocol transfers to stasis applications are
missing the StasisStart with the...
2016 Jul 21
0
Asterisk 13.10.0 Now Available
...install' doesn't seem to install OS/X
init files (Reported by Tzafrir Cohen)
* ASTERISK-26029 - parking: ast_parking_park_call should return
parking_space instead of parking_exten (Reported by Diederik de
Groot)
* ASTERISK-25938 - res_odbc: MySQL/MariaDB statement
LAST_INSERT_ID() always returns zero. (Reported by Edwin
Vandamme)
* ASTERISK-25941 - chan_pjsip: Crash on an immediate SIP final
response (Reported by Javier Riveros )
* ASTERISK-26014 - res_sorcery_astdb: Make tolerant of unknown
fields (Reported by Joshua Colp)
* ASTERISK-24986 - keepalive...
2016 Jul 21
2
Asterisk 13.10.0 Now Available
...install' doesn't seem to install OS/X
init files (Reported by Tzafrir Cohen)
* ASTERISK-26029 - parking: ast_parking_park_call should return
parking_space instead of parking_exten (Reported by Diederik de
Groot)
* ASTERISK-25938 - res_odbc: MySQL/MariaDB statement
LAST_INSERT_ID() always returns zero. (Reported by Edwin
Vandamme)
* ASTERISK-25941 - chan_pjsip: Crash on an immediate SIP final
response (Reported by Javier Riveros )
* ASTERISK-26014 - res_sorcery_astdb: Make tolerant of unknown
fields (Reported by Joshua Colp)
* ASTERISK-24986 - keepalive...
2010 Mar 10
0
RMySQL_0.7-4 core dumped on dbWriteTable
...password="xxxxxx", host="localhost")
> ch4dd<-data.frame(6,"2010-03-06")
> names(ch4dd)<-c("scada_terminal_id","timestamp_on")
> ch4dd
scada_terminal_id timestamp_on
1 6 2010-03-06
> dbGetQuery(con, "SELECT LAST_INSERT_ID() FROM `knottlf_local`.`R_ch4_concentrations`")
data frame with 0 columns and 0 rows
> dbWriteTable(con, name = "R_ch4_concentrations",ch4dd, append = TRUE, row.names = FALSE)
*** buffer overflow detected ***: /usr/lib64/R/bin/exec/R terminated
======= Backtrace: =========
/lib/li...
2017 Feb 13
0
Certified Asterisk 13.13-cert1 Now Available
...RISK-25669 - [patch]CURL incorrect trim for non ASCII
characters (Reported by Jesper)
* ASTERISK-26029 - parking: ast_parking_park_call should return
parking_space instead of parking_exten (Reported by Diederik de
Groot)
* ASTERISK-25938 - res_odbc: MySQL/MariaDB statement
LAST_INSERT_ID() always returns zero. (Reported by Edwin
Vandamme)
* ASTERISK-25941 - chan_pjsip: Crash on an immediate SIP final
response (Reported by Javier Riveros )
* ASTERISK-26014 - res_sorcery_astdb: Make tolerant of unknown
fields (Reported by Joshua Colp)
* ASTERISK-24986 - keepalive...
2016 Jul 27
3
Asterisk 14.0.0-beta1 Now Available
...RISK-25669 - [patch]CURL incorrect trim for non ASCII
characters (Reported by Jesper)
* ASTERISK-26029 - parking: ast_parking_park_call should return
parking_space instead of parking_exten (Reported by Diederik de
Groot)
* ASTERISK-25938 - res_odbc: MySQL/MariaDB statement
LAST_INSERT_ID() always returns zero. (Reported by Edwin
Vandamme)
* ASTERISK-25941 - chan_pjsip: Crash on an immediate SIP final
response (Reported by Javier Riveros )
* ASTERISK-26014 - res_sorcery_astdb: Make tolerant of unknown
fields (Reported by Joshua Colp)
* ASTERISK-24986 - keepalive...
2019 Dec 24
0
Certified Asterisk 16.3-cert1 Now Available
...://issues.asterisk.org/jira/browse/ASTERISK-26029>] -
parking: ast_parking_park_call should return parking_space instead of
parking_exten
(Reported by Diederik de Groot)
- [ASTERISK-25938
<https://issues.asterisk.org/jira/browse/ASTERISK-25938>] -
res_odbc: MySQL/MariaDB statement LAST_INSERT_ID() always returns zero.
(Reported by Edwin Vandamme)
- [ASTERISK-25941
<https://issues.asterisk.org/jira/browse/ASTERISK-25941>] -
chan_pjsip: Crash on an immediate SIP final response
(Reported by Javier Riveros )
- [ASTERISK-26014
<https://issues.asterisk.org/jira/browse/AST...