pulling info from 2 tables

Security issues related to php and mysql usage. How to make your code secure? Security measures and configurations? It's all in here!

Moderators: egami, macek, gesf

Post Reply
php-forum Super User
php-forum Super User
Posts: 180
Joined: Fri Mar 07, 2003 4:59 pm

Thu Jun 10, 2004 3:41 am

Well, for two tables use 2 different queries and then deal with the results...
ps I hope that you check for the $_post['emp'], because if its emty, you are screwed.
but do use 2 queries.
User avatar
New php-forum User
New php-forum User
Posts: 10
Joined: Sun Aug 15, 2004 8:07 am

Mon Sep 27, 2004 12:31 pm

Try this:

Code: Select all

SELECT t1.f1, t2.f2 FROM t1,t2 WHERE t1.id=t2.id
t1,t2 -> table names
f1,f2 -> field names
id -> id field

try echoing the query and see if there is something wrong with it.
the syntax seem to be working
Post Reply