Hi guys i got a problem with this i can get data from the table by using sql :-Select * from staff_badgeTracking inner join staff_badgeTrackingNew
On staff_badgeTracking.Badge_ID = staff_badgeTrackingNew.Badge_ID

The point is if i wan to find a specific badge id like 1234 then it will get the data from two table so how to write the code ?

I write like this but it show error


Select * from staff_badgeTracking inner join staff_badgeTrackingNew
On staff_badgeTracking.Badge_ID = staff_badgeTrackingNew.Badge_ID where badge_id = '1234'

what is the error msg u r getting.

if badge_id column a numeric, then omit the quotation marks for '1234'

You may also have to prefix badge id with one of the two table names since you have an inner join on badge id.


Good Luck

You may also have to prefix badge id with one of the two table names since you have an inner join on badge id.


Good Luck

I don't understand what you said can you write the example for me and correct me on the sql statement

WHERE staff_badgeTracking.Badge_ID = 1234

Good Luck

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.