Jump to content
topekone

Necesito ayuda con consulta MYSQL

Recommended Posts

Bueno, tengo la siguiente consulta de mysql en un php:

 

 function checkPos($inID) {
global $sqlServ;
$sqlCmd="SELECT pos,vnum FROM player.item WHERE owner_id='".$inID."' AND window='SAFEBOX'";
$sqlQry=mysql_query($sqlCmd,$sqlServ);

 

Necesito una consulta, que me compare la columna owner_id, de la tabla item, que es de la base player, con la columna, login, de la tabla y base account.

 

Se trata para un script crea item, que me pide la ID de la cuenta (el numerito), y lo que me interesa que me pida es el nombre de usuario.

 

Gracias

Share this post


Link to post
Share on other sites

Aquí esta tu consulta :D  

SELECT	i.pos AS PosicionItem,	i.vnum AS VnumItem,	a.login AS LoginCuentaFROM	player.item AS i,	account.account AS aWHERE	i.owner_id = a.idAND a.login = 'NombreUsuario'AND i.window = 'SAFEBOX'

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...