Go Back   Webmaster Malaysia Forum » Website Design & Development » Website Programming

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 31-01-2005, 11:49 AM
New kid on the block
 
Join Date: Jan 2005
Location: kuala lumpur
Posts: 7
Rep Power: 0
meiji is on a distinguished road
Question select 2 table

kengkawan... ..ada masalah skit ler....macam mana nak select field dalam 2 table yang berasingan...aku nak display semua field yang ada dalam kedua - dua table tuh dalam satu form....mintak tolong tunjuk skit skill tuh.....

cam ner yerk.....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 31-01-2005, 01:53 PM
lcf's Avatar
lcf lcf is offline
Pro-Blogger
 
Join Date: Feb 2003
Location: Kluang, Johor
Posts: 2,376
Rep Power: 118
lcf will become famous soon enough
Send a message via ICQ to lcf Send a message via MSN to lcf Send a message via Yahoo to lcf
I assume you were referring to database table not HTML table, you need to use JOIN table SQL query to select two tables, join them and get the records of all fields. If you are using MySQL, please refer to manual at http://www.mysql.com
__________________
LiewCF | Malaysia Bloggers Forum
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 31-01-2005, 03:37 PM
New kid on the block
 
Join Date: Jan 2005
Location: kuala lumpur
Posts: 7
Rep Power: 0
meiji is on a distinguished road
Wink

sori tadi....macam nih..aku guna ASP...database access....aku create 2 table...
1- table company : field ( DO,tarikh,caw,pelanggan )
2- table projek :field ( DO,tarikh,no_contrak,kuantiti)

* DO : sebagai primary key

masalahnya..aku nak joint 2 table tuh, untuk display jadi satu jerr...ia kuar camni...

contoh :
DO Tarikh Caw pelanggan
125 12/2/2005 KL ABE Enterprise

No_Contrak Kuantiti
125 200 Kg
200 350 kg


kat bawah nih...command yang aku cuba guna....contoh yang aku cari kat internet......tp dia tak nak jadi lak.....

set rs=Server.CreateObject("ADODB.recordset")
sConnString = "DRIVER={Microsoft Access Driver (*.mdb)};" & _
"DBQ=" & Server.MapPath("stock.mdb") & ";"
sqlstmt = "SELECT DO,tarikh,caw,pelanggan
FROM company
INNER JOIN projek
ON Keluar.DO = projek.DO
rs.open sqlstmt, sConnString


aku harap ko faham.....

Last edited by meiji; 31-01-2005 at 04:39 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 31-01-2005, 05:05 PM
lcf's Avatar
lcf lcf is offline
Pro-Blogger
 
Join Date: Feb 2003
Location: Kluang, Johor
Posts: 2,376
Rep Power: 118
lcf will become famous soon enough
Send a message via ICQ to lcf Send a message via MSN to lcf Send a message via Yahoo to lcf
I have forgot about Access. Anyway, your sql statement is incorrect. Replace sqlstmt query string with the following:

Code:
sqlstmt = "SELECT DO,tarikh,caw,pelanggan
FROM company INNER JOIN projek
ON company.DO = projek.DO
Hope this helps.
__________________
LiewCF | Malaysia Bloggers Forum
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-02-2005, 09:50 AM
New kid on the block
 
Join Date: Jan 2005
Location: kuala lumpur
Posts: 7
Rep Power: 0
meiji is on a distinguished road
masih tak jadi

Lcf....masih tak jadi la...boleh tak u bagi aku coding sepenuhnya yang u tahu....coding yang aku jumpa semua tak jadi....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-02-2005, 10:32 AM
lcf's Avatar
lcf lcf is offline
Pro-Blogger
 
Join Date: Feb 2003
Location: Kluang, Johor
Posts: 2,376
Rep Power: 118
lcf will become famous soon enough
Send a message via ICQ to lcf Send a message via MSN to lcf Send a message via Yahoo to lcf
Do you get any error message?
__________________
LiewCF | Malaysia Bloggers Forum
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
<table> are they bad? robot Website Design 12 03-01-2007 12:32 PM
Mod: Table and cup Tahar Graphic Design 1 06-10-2006 08:40 PM
select box/drop down menu hymns Website Design 4 21-07-2004 04:24 PM
Table? Css? lcf Website Design 10 22-03-2004 09:40 AM
retrieving select box.. joyce Website Programming 4 09-04-2002 01:38 AM


All times are GMT +8. The time now is 12:08 PM. Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0 vBulletin skin by ForumMonkeys.com.


WebmasterMalaysia.com is Proudly Hosted by Exabytes Semi Dedicated Server.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61