so try mysql_query(), and mysql_num_rows().
SQL return if not found
Moderator: General Moderators
Re: SQL return if not found
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().
so try mysql_query(), and mysql_num_rows().
-
MHardeman25
- Forum Commoner
- Posts: 42
- Joined: Mon Jul 12, 2010 10:34 am
Re: SQL return if not found
ok, if I get rid of my SQL_Connect file, and put the sql in the same file, then it works.
-
MHardeman25
- Forum Commoner
- Posts: 42
- Joined: Mon Jul 12, 2010 10:34 am
Re: SQL return if not found
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?
-
MHardeman25
- Forum Commoner
- Posts: 42
- Joined: Mon Jul 12, 2010 10:34 am
Re: SQL return if not found
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
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.
-
MHardeman25
- Forum Commoner
- Posts: 42
- Joined: Mon Jul 12, 2010 10:34 am
Re: SQL return if not found
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.