MYSQL multiple queries in one command
#4

Quote:
Originally Posted by zPain
View Post
There's no need for 2 queries. You can write a JOIN statemente 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=
Thats it! Anyway if you want to check about JOIN query's take a look!
http://dev.mysql.com/doc/refman/5.7/en/join.html
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: 2 Guest(s)