/* -*-c,save-*- */ /* * example.c - test prog * Robert Heller. Created: Sun Oct 26, 1986 01:14:27.13 * Last Mod: * */ #include #include "sdb.h" main() { DB_SEL *sptr; char payee[100], amount[100]; /* setup retrieval */ if ((sptr = db_retrieve("checks where amount > 25.00")) == NULL) { db_perror("example (checks)"); exit(); } /* bind user varianbles to attributes */ db_bind(sptr,"checks","payee",payee); db_bind(sptr,"checks","amount",amount); /* loop through selection */ while (db_fetch(sptr)) printf("%s\t%s\n",payee,amount); /* finish selection */ db_done(sptr); }