skip to Main Content

SIGSEGV on simple mysql_query in C using Mariadb

I have a function that I query my database: void update_layout_database() char query[255]; MYSQL_ROW row; float wd,ht; sprintf(query,"SELECT name,wd,ht FROM pagelayouts WHERE drawing=%s AND handle=%ld;",drawing_number,layoutID); mysql_query(sqlconnect,query); MYSQL_RES *result = mysql_store_result(sqlconnect); row=mysql_fetch_row(result); if(row!=NULL){ if(atof(row[1])==0 || atof(row[2])==0 || !strcmp(row[0],"Model")){ wd=Extents[2]-Extents[0]; ht=Extents[3]-Extents[1]; sprintf(query,"UPDATE…

VIEW QUESTION
Back To Top
Search