Insert Two Inputs Into One Column

Hi Chaps,

Maybe a simple answer to this one, I have two input fields, which I want to combine into 1 SQL column.

Inputs:

<input type="text" name="job_no" value="00001" size="32" />
<input type="text" name="job_model" value="MODEL_A" size="32" />

SQL:

"INSERT INTO tbl_job (job_title) VALUES (%s)", GetSQLValueString($_POST['job_no'], "text").GetSQLValueString(' - '.$_POST['job_model'], "text");

This produces:
job_title = 00001’ - MODEL_A

Problem:
Notice the character after the job_no. . . .how do I get rid of this?

Try


"INSERT INTO tbl_job (job_title) VALUES (%s)", GetSQLValueString($_POST['job_no'], "text") . ' - ' . GetSQLValueString($_POST['job_model'], "text");

Hi,

thanks for the reply, I tried that but returned:

Truncated incorrect DOUBLE value:

Sorted it, I altered the function that was inserting '/" marks between text, double, date, float data types.