User login

Decimal numbers and Drupal's db_query (sprintf)

GMap centering rounds off?

Drupal.extend({ settings: { "gmap": { "view_gmap": { "width": "100%", "height": "300px", "zoom": 9, "controltype": "Small", "align": "None", "maptype": "Hybrid", "line_colors": [ "#00cc00", "#ff0000", "#0000ff" ], "behavior": { "locpick": false, "nodrag": 0, "nokeyboard": 1, "nomousezoom": 0, "autozoom": 0, "dynmarkers": 0, "overview": 0, "notype": 0, "collapsehack": 0, "scale": 0, "fatmarkers": false }, "markermode": "1", "longitude": "-71.000000", "latitude": "42.000000", "markers": [

svn commit -m "that was very silly-- values (variables) with numbers after the decimal point have to be passed in as %f, not %d, i Drupal's mysql query wrapping function (which uses the PHP string function conventions for those percent letter things)"



Fix doesn't help

I'm having the same bug, but the insert query already has the %f. Any other bugs/fixes I have to integrate?

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Syntax highlight code surrounded by the {syntaxhighlighter SPEC}...{/syntaxhighlighter} tags, where SPEC is a Syntaxhighlighter options string or "class="OPTIONS" title="the title".
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.