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

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -