crash when executing this line

Development forum for the EQ2Emulator Database project.

Moderator: Team Members

Post Reply
User avatar
Ememjr
Team Member
Posts: 975
Joined: Wed Mar 15, 2017 9:41 am
EQ2Emu Server: Perseverance

crash when executing this line

Post by Ememjr » Thu Oct 26, 2017 4:28 am

can anyone see what is wrong with this

Code: Select all

MYSQL_RES* result = query.RunQuery2(Q_SELECT, "SELECT h.id,h.house_id, h.item_id, h.x, h.y, h.z, h.rotation, h.pitch, h.roll, h.scale, h.incrate,i.model_id,i.primary_command,i.secondarycommand FROM house_item_list h,item_details_house i WHERE h.house_id = %s and h.item_id = i.item_id ", house_id );
if i put in my query editor and just change the hosueidto the actually id the query works
thinking it is something to do with ", house_id and the corresponding %s

do i need to convert house_id to a string?

User avatar
Ememjr
Team Member
Posts: 975
Joined: Wed Mar 15, 2017 9:41 am
EQ2Emu Server: Perseverance

Re: crash when executing this line

Post by Ememjr » Thu Oct 26, 2017 11:36 am

i tied with %i and with %s converting house_id to a string with to_string(house_id)

althoguh i dont get error anymore, its not pulling result

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: crash when executing this line

Post by Jabantiz » Thu Oct 26, 2017 3:24 pm

First off I suck with sql so I am mostly just guessing and can't be sure with out even seeing the tables.

What is `house_id` in the table? If it is just an int then all you would need is a %i, no need to change it to a string.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests