OhHai
11-06-2012, 09:59 PM
Hey all, new here; no idea where to post. Heh, so I am a failure at writing functions; as I have not studied much on them.. Basically I am trying to make New = 1 and Used = 0 so it will post in place with a simple $coach_meta.. I know it is easy, but hey, I suck.
function coach_meta2 ($nu = '') {
global $dbh;
$output = '';
$coach_meta = coach_meta($data['ID']);
$nu = ($coach_meta['ecpt_newused']);
if ($nu = "New") {
$nu = "1";
}
else
{
if ($nu = "Used") {
$nu = "0";
}
$nu = mysql_query($query);
while($data2 = mysql_fetch_assoc($nu)) {
$output = $data2;
}
}
return $output;
}
Anyone care to help an noob? haha
function coach_meta2 ($nu = '') {
global $dbh;
$output = '';
$coach_meta = coach_meta($data['ID']);
$nu = ($coach_meta['ecpt_newused']);
if ($nu = "New") {
$nu = "1";
}
else
{
if ($nu = "Used") {
$nu = "0";
}
$nu = mysql_query($query);
while($data2 = mysql_fetch_assoc($nu)) {
$output = $data2;
}
}
return $output;
}
Anyone care to help an noob? haha