How to set relation for MySql?

Post Reply
User avatar
dutch
Posts: 1395
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

How to set relation for MySql?

Post by dutch »

Dear All,

I try to work with TMySql but I cannot find "How to set Relation" between 2 related file.

How much difference between ::Query() and ::Seek()?

Regards,
Dutch
Regards,
Dutch

FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
User avatar
lucasdebeltran
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am
Contact:

Re: How to set relation for MySql?

Post by lucasdebeltran »

Hello,

You can try:


SELECT * FROM Address, Customer WHERE Address.Id = Customer.Id


where Id is the relation field. Then you can use

oRs:Fields( "Name" ):Value
Muchas gracias. Many thanks.

Un saludo, Best regards,

Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]

Implementando MSVC 2010, FWH64 y ADO.

Abandonando uso xHarbour y SQLRDD.
User avatar
wmormar
Posts: 1050
Joined: Fri Oct 07, 2005 10:41 pm
Location: México
Contact:

Re: How to set relation for MySql?

Post by wmormar »

dutch,

The relationships are given in the tables directly access eg

SELECT a.venta, a.cliente, a.fecha, b.nombrecliente FROM sales AS a INNER JOIN customer AS b ON b.clave = a.cliente

The :: Seek method is used to find information in the table and the row can regbresarte found or a value true or false, meanwhile :: Query you table extracts information such as set an example query above.
William, Morales
Saludos

méxico.sureste
User avatar
dutch
Posts: 1395
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: How to set relation for MySql?

Post by dutch »

Dear William and Lucas,

Thanks for your kind help, I get an idea now.
Regards,
Dutch

FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
Post Reply