Better way to perform multiple selects in one mysql query? -
i've got insert query contains several select statements. feel there's got better (more efficient, more optimized, etc) way this. suggestions?
insert log (logtype, subtype, src_ip, dst_ip, dst_port, query) values (2, 1, (select src_ip query uid="123"), (select dst_ip query uid="123"), (select dst_port query uid="123"), (select query query uid="123"))
insert log (logtype, subtype, src_ip, dst_ip, dst_port, query) select 2, 1, src_ip, dst_ip, dst_port, query query uid="123"
Comments
Post a Comment