473,394 Members | 1,761 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Saving " in a Pervasive SQL database

I am trying to save the " (inch mark) and ' (foot mark) into a database. I am not using MySQL regrettably. Instead, I have to use a Pervasive SQL database, version 8.5.

The user is supposed to enter the height a plant normally grows to. An acceptable answer may be 6'. I have a textbox for the number and use JavaScript to verify it is a number. That works fine. I have two radio buttons that ask Inches or Feet because some people do not know the difference.

The height is saved as $_POST["height"] while the unit of measurement is $_POST["uom"].

To see what option the user chose, I use a basic if statement...
Expand|Select|Wrap|Line Numbers
  1. if($_POST["uom"] == 'feet')
  2. {
  3.     $height = $_POST["height"] . "\"'"\";
  4. }
  5. else
  6. {
  7.     $height = $_POST["height"] . "\"""\"
  8. }
  9.  
I am getting an SQL error when inserting this into my table:

Warning: SQL error: [unixODBC][Pervasive][Pervasive ODBC Client Interface][Pervasive][ODBC Engine Interface]Syntax Error: ion, border,accent,groundcolor,erosion_control,cut_flow er,wet,dry,boddy,fragrant,key_benefits,growth) VALUES( 'shade', 's', 's', 'd', '', '', '', '', '', '', '', '', 1, 0, 0, 1, '', 5\<< ??? , SQL state 37000 in SQLExecDirect in /var/www/html/plantbase/new_entry.php on line 578

I know the problem is with the "\"""\" portion because I have tested this every which way and it all works until I try inserting the " or ' symbol. Any ideas on how to get this to work?

Thanks very much!
Jan 12 '09 #1
1 2383
Dormilich
8,658 Expert Mod 8TB
are these signs the single and double quotation marks? maybe it helps to replace them by the unicode signs. foot: U+2032 (&#8242;), inch: U+2033 (&#8243;)
Jan 13 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

49
by: Ville Vainio | last post by:
I don't know if you have seen this before, but here goes: http://text.userlinux.com/white_paper.html There is a jab at Python, though, mentioning that Ruby is more "refined". -- Ville...
0
by: Classic Software, Inc. | last post by:
Need to get some Pervasive SQL or Btrieve data into a SQL Server database? For those needing to do so, we sell a very useful tool for Btrieve and Pervasive SQL Databases. Has an explorer type...
5
by: Chuy | last post by:
I am using Maximizer Enterprise 8.0 as my companies CRM solution. Currently we are using the included Pervasive SQL that shipps with the product. Is there someone out that who could tell me if...
5
by: Alex Le Dain | last post by:
What is the best way to access a Pervasive database on another machine? cheers, Alex.
0
by: Classic Software, Inc. | last post by:
Need to get some Pervasive SQL or Btrieve data into a Microsoft Access database? For those needing to do so, we sell a very useful tool for Btrieve and Pervasive SQL Databases. Has an explorer...
0
by: jan82 | last post by:
I receive the following error when trying to connect to a Pervasive database through ODBC: ERROR No available transport protocol for the Pervasive Network Services Layer. ERROR Driver's...
0
by: jan82 | last post by:
I receive the following error when trying to connect to a Pervasive database through ODBC: ERROR No available transport protocol for the Pervasive Network Services Layer. ERROR Driver's...
2
by: Manah | last post by:
I currently receive text files that need to be manipulated into a suitable format for uploading into a Pervasive/Btrieve datafile. The text file I receive needs a number of steps to clean it up and...
3
by: 01423481d | last post by:
Hi All I am facing a very strange "problem" on the captioned issue, I hope I can explain it clearly. Actually I am developing an interface (using VB.net) which read records from a file and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.