Welcome Guest, Not a member yet? Register   Sign In
function() + mysql problem
#3

[eluser]brian.89[/eluser]
solution:

function users($db, $str)
{
$query = $db->db->query("select * from bw_users where id='".$str."'");
if ($query->num_rows() > 0)
{
$row=$query->row();
return $row->username;
}
else
{
return "fatal error";
}
}


....


<?= users($this,$row->sent_id); ?>

$this == database ... i give it to function().

that's work!

thx


Messages In This Thread
function() + mysql problem - by El Forum - 09-16-2010, 05:21 AM
function() + mysql problem - by El Forum - 09-16-2010, 08:08 AM
function() + mysql problem - by El Forum - 09-16-2010, 08:16 AM
function() + mysql problem - by El Forum - 09-16-2010, 10:25 AM
function() + mysql problem - by El Forum - 09-16-2010, 11:54 PM



Theme © iAndrew 2016 - Forum software by © MyBB