MYSQL multiple queries in one command
#3

There's no need for 2 queries. You can write a JOIN statement based on the user id.

PHP Code:
SELECT
    tickets
.*,
    
spieler.name AS username
FROM
    tickets
INNER JOIN
    spieler ON spieler
.id tickets.userid
WHERE
    tickets
.status=
Reply


Messages In This Thread
MYSQL multiple queries in one command - by MichiEXE - 14.06.2016, 22:26
Re: MYSQL multiple queries in one command - by Stinged - 14.06.2016, 23:20
Re: MYSQL multiple queries in one command - by zPain - 15.06.2016, 00:51
Re: MYSQL multiple queries in one command - by StreetGT - 15.06.2016, 00:53
Re: MYSQL multiple queries in one command - by MichiEXE - 15.06.2016, 05:23
Re: MYSQL multiple queries in one command - by MichiEXE - 15.06.2016, 11:04

Forum Jump:


Users browsing this thread: 1 Guest(s)