2006-12-10, 04:42 AM
I have a field in mybb_userfields called fid4 which is console #.
If I wanted to display that in a textbox for a form, how would I write that?
I have some very ugly code just trying to get a feel for how to do this. I'm not even close to actualy displaying it in the members.php page though.
Here is my code:
As you can see, I am calling 2 tables, joining them and then displaying the results however nothing displays. I would think I would get results that show all users in database whether they have w.wiimail populated or not since there is a LEFT JOIN on the two tables.
See here: http://freemywii.com/forums/wiimail.php - it returns nothing using this code.
Any help?
If I wanted to display that in a textbox for a form, how would I write that?
I have some very ugly code just trying to get a feel for how to do this. I'm not even close to actualy displaying it in the members.php page though.
Here is my code:
<?php
define("IN_MYBB", 1);
require("./global.php");
$query = $db->query("
SELECT u.uid, w.wiimail
FROM mybb_users u
LEFT JOIN mybb_wiixchange w ON (w.uid=u.uid)
WHERE w.wiimail='".$db->escape_string($mybb->input['wiimail'])."'
");
$string = "";
while ($r = $db->fetch_array($query)) {
$string .= $r['wiimail'];
}
echo $string;
?>
As you can see, I am calling 2 tables, joining them and then displaying the results however nothing displays. I would think I would get results that show all users in database whether they have w.wiimail populated or not since there is a LEFT JOIN on the two tables.
See here: http://freemywii.com/forums/wiimail.php - it returns nothing using this code.
Any help?