View Single Post
Join Date: Dec 2008
Posts: 6
Reputation: mm2409 is an unknown quantity at this point 
Solved Threads: 0
mm2409 mm2409 is offline Offline
Newbie Poster

generating random id and save it into db

 
0
  #1
Dec 3rd, 2008
dear frnds,

i hace wrote this code to generate unique id for questionnaire and a query to save it into database with two more value (response id and date)

individually i have checked and unique id function is working.
even insert query is also executing correctly.

but when i put it whole into my php file it doesnt save values into DB.

please help to sort it out. i m in hurry.

code is here:

  1. $que_id = uniqid(que);
  2. echo $que_id;
  3. echo "<br>";
  4.  
  5. $db->query("INSERT INTO tbl_CT_Responses (Response_ID,Questionnaire_ID,Response_Date)
  6. VALUES (".GetSQLValueString("",`int`).","
  7. .GetSQLValueString($que_id,`int`).","
  8. .GetSQLValueString(date('Y-m-d'),`date`)
  9. .")");
  10.  
  11. echo "The questionnaire ID is inserted successfully";
  12. ?>
Last edited by peter_budo; Dec 3rd, 2008 at 6:53 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote