strange error with mysql_query

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
wooshie
Forum Newbie
Posts: 5
Joined: Fri Jan 10, 2003 1:41 pm
Contact:

strange error with mysql_query

Post by wooshie »

I wrote a class which has the connect function for connecting to mysql database, it works perfectly, but query called in other method of same class returns empty set, though i ran it in console and it works perfectly.
can anybody pinpoint a problem?

P.S. I hope it won't begin to work when I come to work tomorrow :)
cns
Forum Newbie
Posts: 2
Joined: Thu Jan 23, 2003 2:57 am

error with mysql_query

Post by cns »

In the same class u wrote connection and function for mysqlquery.
Just check whether u called the connection function again in the mysqlquery function.If not call the connect function
wooshie
Forum Newbie
Posts: 5
Joined: Fri Jan 10, 2003 1:41 pm
Contact:

Post by wooshie »

I debugged my class and discovered that i must call the function for selcting database separately, not from constructor. Strange a bit, but works.
Post Reply