Page 2 of 2
Re: SQL return if not found
Posted: Wed Jul 14, 2010 11:59 pm
by liljester
ok, for now atleast until you get the logic ironed out, try using the native mysql_ functions instead of your db helper functions. lets limit the things that can be causing issues

with a quick look it appears your helper functions are done right but its midnight and it was just a quick look..
so try mysql_query(), and mysql_num_rows().
Re: SQL return if not found
Posted: Thu Jul 15, 2010 12:08 am
by MHardeman25
ok, if I get rid of my SQL_Connect file, and put the sql in the same file, then it works.
Re: SQL return if not found
Posted: Thu Jul 15, 2010 12:10 am
by liljester
yay

Re: SQL return if not found
Posted: Thu Jul 15, 2010 12:13 am
by MHardeman25
kind of, I still want to use that file though. It cuts down on the writing the code at the begining of every page. Why does it not work when the database connection are in a different place?
Re: SQL return if not found
Posted: Thu Jul 15, 2010 12:17 am
by MHardeman25
ill work on it tomorrow. It's late. If any of you have some blinding insight on what's going on. Let me know.
Re: SQL return if not found
Posted: Thu Jul 15, 2010 10:52 am
by liljester
all you need to include in your connect file is the connection to the database, you dont have to wrap all of the mysql functions in your own functions.
Re: SQL return if not found
Posted: Thu Jul 15, 2010 12:36 pm
by MHardeman25
But if I do all the connections in the connect file, and I try to use that stuff in a different file, then it won't find the variables. It'll give me a undefined variable error.