Recent

Author Topic: Needing help with Sqlite and zeos connex  (Read 307 times)

Buraa

  • Newbie
  • Posts: 1
Needing help with Sqlite and zeos connex
« on: January 23, 2021, 02:27:01 pm »
Hello guys

I've two tables named Premix and FeedPremix
Premix_table has two col < premix name & premix ID >
while Feedpremix _table has four col < Feed_ID , premix ID , Premix Quantity  & premix quantity ID >

while both feedID and premix_quantityID are primary keys

how do i get the query to pull both Premix name and premixquantity based on premixID

thanks

speter

  • Full Member
  • ***
  • Posts: 187
Re: Needing help with Sqlite and zeos connex
« Reply #1 on: January 24, 2021, 12:59:19 am »
Buraa, Welcome to the Lazarus forum! :)

If I understand you correctly, you want to know the SQL for  the query.

I think that would be:

select PremixName, PremixQuantity from Premix_table, Feedprimix_table where Premix_table.premixID=Feedprimix_table.premixID

Note that I removed some spaces from your Field / Table names.

cheers
S. :)
I climbed mighty mountains, and saw that they were actually tiny foothills. :)

Laz 2.0.10 / FPC 3.2.0 / Windows 10 (64bit)

 

TinyPortal © 2005-2018