La tabla tiene un campo que dice se_tira, se_da, se_come , se_lee. Si el campo es si, quiero qe haya un limk qe diga, se tira, sino, nda.
pero no me sale..
Solo me salen todos los links pero no los que se pueden hacer con ese objeto
Mi codigo:
Código PHP:
Ver original
<?php # FileName="Connection_php_mysql.htm" # Type="MYSQL" # HTTP="true" $hostname_Noone = "mXXXXXXXXXXXXm"; $database_Noone = "aXXXXXXXXXXl"; $username_Noone = "XXXXXXXXXXXXXXXl"; $password_Noone = "XXXXXXXXXX"; $Noone = mysql_pconnect($hostname_Noone, $username_Noone, $password_Noone) or trigger_error(mysql_error(),E_USER_ERROR); ?> <?php function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { if (PHP_VERSION < 6) { } $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": break; case "double": break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } $colname_usuarios = "-1"; $colname_usuarios = $_SESSION['MM_Username']; } $query_usuarios = sprintf("SELECT id, usuario FROM usuarios WHERE usuario = %s", GetSQLValueString($colname_usuarios, "text")); $query_objetos = "SELECT * FROM objetos "; $query_relacion = "SELECT * FROM objetos INNER JOIN inventario ON inventario.id_o = objetos.id WHERE inventario.id_u = $row_usuarios[id] ORDER BY id_o ASC"; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Documento sin título</title> <style type="text/css"> <!-- .contenido {color: #000000} .important {color: #FF0000} .Estilo1 { font-family: Arial, Helvetica, sans-serif; font-weight: bold; } .Estilo2 { font-family: Arial, Helvetica, sans-serif; font-size: 12px; } .Estilo3 {font-size: 12px} --> </style> </head> <body> <div align="left" class="Estilo1 Estilo3">Tu inventario</div> <p align="center" class="Estilo2"> </p> <p align="center" class="Estilo2"> </p> <table border="1"> <?php do { ?> <tr> <td><?php echo "<center>$row_relacion[nombre]</center>"; ?><br /><? echo "<center><img src=$row_relacion[img]></center>"; ?></td> <td><? if( $row_relacion['se_subasta'] = si ) { echo " >> Subastar objeto "; } if( $row_relacion['se_tira'] = si ) { echo " >> Tirar objeto "; } if( $row_relacion['se_dona'] = si ) { echo " Donar objeto "; } if( $row_relacion['se_da_a_otro'] = si ) { echo " Regalar objeto "; } if( $row_relacion['se_come'] = si ) { echo " Comer alimento "; } if( $row_relacion['se_lee'] = si ) { echo " Subastar objeto "; } ?> </td> </tr> </table> </body> </html> <?php ?>