I have a database called catalog, it has two three columns one is just the key field, the other is a integer called “code” and the other is a NSString called “make”.
My app allows the user to type in a code to search for any makes that have that code, so there is a uitextfield where they can type the code then the user presses a uitextfield cell that loads a new uitableview onto the navigation stack I want to display any makes that have the code that was entered in the previous view here.. I have most of the code done as I am following a great guide “professional iphone and ipad database application programing” however in the step I am doing they just show all the data not a restriction of data, I would like to know how to do this.
here is my sql request string
const char *sql = "SELECT catalog.make From catalog where catalog.code =???
I would like to know what should come next, how to I execute this statement with the code the user has entered in the uitextfield?
any help would be greatly appreciated.
I’d just make the SQL statement into an
NSString, it’s easier.Assuming the
UITextFieldyou’re collecting data from is anIBOutletcalledmyText: