Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
6 + 6 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     

Re: Formatting Height
by redheadedrod on 2011/1/23 1:04:36

That function is not even close to what would work..

You would have been passing the height to the function which means you dont need the query...

And you have to return a variable and you can only do one so you would have to convert it to a string and return the string.

The way we worked it out over yahoo should work ok for you.

If you would have done something like...

le="color: #000000"><?php function getheight($height) { $inches = $height % 12; $feet = ($height - $inches) / 12; return $feet . " ' " . $inches . ' " '; }


This MIGHT have worked. Haven't tried something like this with a function yet though.

Then you would have called it like...

le="color: #000000"><?php $finalheight=getheight($height);


Rodney
Re: Formatting Height
by Arowana on 2011/1/22 23:45:29

EDIT Removed post testing failed
Re: Formatting Height
by Arowana on 2011/1/22 22:23:28

What is wrong with this function? Willing to hirer someone at this point, anyone got a few minutes that can program this function?

le="color: #000000"><?php function getHeight($height){ global $xoopsDB; $query = 'SELECT height FROM ' . $xoopsDB->prefix('xRoster') . ' WHERE id =id'; $inches = $height % 12; $feet = ($height - $height_inches) / 12; }
Re: Formatting Height
by Arowana on 2011/1/22 20:35:53

Anyone have some ideas?

Sorry pretty stuck here
Re: Formatting Height
by Arowana on 2011/1/22 7:02:40

can this be put into common.inc.php as a function?
le="color: #000000"><?php $height_inches = $height % 12 $height_feet = ($height - $height_inches) / 12

If Yes, how would you right the function

xRoster = sql table
height = sql row

le="color: #000000"><?php function getHeight{ $height_inches = $height % 12; $height_feet = ($height - $height_inches) / 12; }

Who's Online

189 user(s) are online (149 user(s) are browsing Support Forums)


Members: 0


Guests: 189


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits