close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

t get value both Inch Marks & Feet Marks go into database without error

Thread began 3/26/2021 1:36 pm by lr_leal239405 | Last modified 3/29/2021 11:06 am by Ray Borduin | 630 views | 3 replies |

lr_leal239405

t get value both Inch Marks & Feet Marks go into database without error

I have a value from our database that has to be inserted into another table when it's selected from a dropdown. I get 'syntax error' upon submitting to enter. It is this: 2.5" Flexible neoprene composite duct, 25' bulk length

When I take off the feet mark from 25', it works fine. I've tried the following:

$myvalue = addslashes($WADAcac_prod_subcategory_leveltwo_NEW_insertx->getColumnVal('prod_name');

$myvalue = str_replace("'", '",$WADAcac_prod_subcategory_leveltwo_NEW_insertx->getColumnVal('prod_name');

$myvalue = str_replace("'", "ft",$WADAcac_prod_subcategory_leveltwo_NEW_insertx->getColumnVal('prod_name');

$myvalue = str_replace("'", "ft",addslashes($WADAcac_prod_subcategory_leveltwo_NEW_insertx->getColumnVal('prod_name'));

$myvalue = addslashes(str_replace("'", "ft",$WADAcac_prod_subcategory_leveltwo_NEW_insertx->getColumnVal('prod_name'));

and many other ways. On top of that, this is from a call to an AJAX function that replaces the code, which works fine, but not sure if that has anything to do with it. The exact code right now is in a do while (all works fine as long as I take off the single quote mark).

Attached is the file that is called using AJAX. Line 102.

Can you help with this? Thanks.

Thanks.

Sign in to reply to this post

Ray BorduinWebAssist

What happens when you use:

php:
<select name="prod_namedd" id="prod_namedd" tabindex="10" onChange="getPrice(this.value)" autocomplete="on">

            <option value="" selected>-Select-</option>
<?php
$wa_startindex 
0;
while(!
$WADAcac_prod_subcategory_leveltwo_NEW_insertx->atEnd()) {
  
$wa_startindex $WADAcac_prod_subcategory_leveltwo_NEW_insertx->Index;
?>
        <option value="<?php echo(!empty($WADAcac_prod_subcategory_leveltwo_NEW_insertx->getColumnVal('prod_name')))?$WADAcac_prod_subcategory_leveltwo_NEW_insertx->getColumnVal('prod_name'):$WADAcac_prod_subcategory_leveltwo_NEW_insertx->getColumnVal('prod_name2'); ?>"><?php echo($WADAcac_prod_subcategory_leveltwo_NEW_insertx->getColumnVal('prod_name')); ?><?php echo($WADAcac_prod_subcategory_leveltwo_NEW_insertx->getColumnVal('prod_name2')); ?></option>
        <?php
  $WADAcac_prod_subcategory_leveltwo_NEW_insertx
->moveNext();
}
$WADAcac_prod_subcategory_leveltwo_NEW_insertx->moveFirst(); //return RS to first record
unset($wa_startindex);
unset(
$wa_repeatcount);
?>
    </select>
Sign in to reply to this post
Did this help? Tips are appreciated...

lr_leal239405

Thanks for your help. I still get a syntax error after replacing with your code because of the single quote mark.

I had this originally:

<?php
echo "<option value='" . ((!empty($WADAcac_prod_subcategory_leveltwo_NEW_insertx->getColumnVal('prod_name')))?html_entity_decode($WADAcac_prod_subcategory_leveltwo_NEW_insertx->getColumnVal('prod_name')):html_entity_decode($WADAcac_prod_subcategory_leveltwo_NEW_insertx->getColumnVal('prod_name2'))) . "' " . "selected>";
echo html_entity_decode($WADAcac_prod_subcategory_leveltwo_NEW_insertx->getColumnVal('prod_name')) . html_entity_decode($WADAcac_prod_subcategory_leveltwo_NEW_insertx->getColumnVal('prod_name2')) ;
echo "</option>";
?>

Sign in to reply to this post

lr_leal239405

UPDATE - I didn't get that one set of code to work but I worked around it by replacing the data in the original table it's pulling from with

&apos;

instead of the feet mark '

2.5" Flexible neoprene composite duct, 25&apos; bulk length


Thanks

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...