Help with DBwrite step

Answered Question
Sep 20th, 2010

I am attempting to create a new record and append new information stored in a variable to a table.  I am able to get the script  to do a static string but it will not use the value of the string variable I have setup.

For example:

user calls in and inputs their phone number.

script places the number in a variable called PhoneNumber

The DBwrite step attempts to upload and create a new record to table with the phonenumber field populated by the value in the variable PhoneNumber.

INSERT INTO tivr_test
(phonenumber)
VALUES
('PhoneNumber')

Ayn assistance would be welcome and appreciated.

I have this problem too.
0 votes
Correct Answer by khambetea about 6 years 4 months ago

Did you try using $PhoneNumber?

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
anthoney_murphy... Tue, 09/21/2010 - 08:01

Its the oddest thing.  After I originally posted this I did use the

$PhoneNumber statement and it still did not work.  I then read somewhere that

IPCC and SQL handle string variables differently and that I would need

to convert the string to and integer in order to do this.  I did this but neglected to

change the SQL statement to use the int variable.

  I tested and was able to write the string to the
table.  It wasnt until I checked the SQL statement that I realized that i was writing a string to the database.  I am still investigating why it is now working.

Actions

This Discussion