AI Zone Admin Forum Add your forum

Chatbot Conference in the Netherlands on Tue 24, 2018, with international line-up! Check it out

postgresql and chatscript
 
 

u: (subject _*) if (^dbexecute(^“SELECT grade FROM Subject where subjectname = ‘‘_0’ ;” ‘^myfunc))
  {grade}
  else {dbexecute failed tables - $$db_error} # to see tables: SELECT * FROM pg_catalog.pg_tables

hi im trying to get the value grade of a specific subject. how do return the grade or how do i make the grade the output?.

 

 
  [ # 1 ]

So the error that caused it is my subject name shud all be in capiital letters since it is all caps in my db.. what im trying to do now is return multiple data.

u: (sub _*) if (^dbexecute(^“SELECT subjectname, grade FROM Subject where subjectname = ‘‘_0’;” ‘^myfunc))
              {grade}
  else {dbexecute failed tables - $$db_error} # to see tables: SELECT * FROM pg_catalog.pg_tables

So far chatscript only returns the subject name.

This is the output: MATH1\n grade.

Why is there a \n after the data? n how do i correct the structure of the replied sentence of the bot?

 

 
  login or register to react