close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Non-numeric value error?

Thread began 10/06/2020 8:26 am by Peterson Design Studio - jefferis | Last modified 10/06/2020 10:37 am by Ray Borduin | 352 views | 4 replies |

Peterson Design Studio - jefferis

Non-numeric value error?

Hi Ray, I have created the new connection to the db for mysqli and php 7 for the site I'm redoing.
I am now encountering this error:

$
Warning : A non-numeric value encountered in /usr/home/buyer.com/pages/gold3.php on line 265


this is the line:
$<?php echo number_format (($GoldPrices->getColumnVal('price') * $GoldPrices->getColumnVal('rate') * 0.0208), 2) ; ?>

Does this indicate that the column for price is in the wrong format? This is the value in that column: 1910.00

Sign in to reply to this post

Ray BorduinWebAssist

It implies that either price or rate are not a number. Write both of them separately to the page to make sure they have the values that you expected.

Sign in to reply to this post
Did this help? Tips are appreciated...

Peterson Design Studio - jefferis

Not sure I understand... The rate in this case is 0.85 in the db table. I'm looking at the columns in Navicat THEY ARE DECIMAL FIELDS... I pasted this in the page: <h1> HERE<?php echo $GoldPrices->getColumnVal('price'); echo $GoldPrices->getColumnVal('rate') ; ?> </h1>
but the price and the rate do not post.

This is the call from the connection:
<?php
$GoldPrices = new WA_MySQLi_RS("GoldPrices",$LiveGold_i,1);
$GoldPrices->setQuery("SELECT * FROM goldprices WHERE metal = 'metal'");
$GoldPrices->execute();
?>

Sign in to reply to this post

Ray BorduinWebAssist

Most likely your recordset isn't returning a value.

SELECT * FROM goldprices WHERE metal = 'metal'

It doesn't look like that is a valid value for the metal field. It should be something like:

SELECT * FROM goldprices WHERE metal = 'Gold'

Sign in to reply to this post
Did this help? Tips are appreciated...

Peterson Design Studio - jefferis

TA-DA!!!

thanks Ray. There was a problem converting the old php queries to the new ones when I used the new Databridge to update the old version. The issue seemed to be that a query with multiple calls was not converted correctly. It would convert the first query but not the rest. I've copied the old queires below. For some reason, it didn't change the metal types.

Jeff

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...