jaikar Posted June 8, 2007 Share Posted June 8, 2007 i have a class something like this class db { function run($sql){ $res=mysql_query($sql) or die(mysql_error()); return $res; } } if i call this method with a query, the query is not executing and if its wrong its not showing the mysql error... but if i execute the query directly using mysql_query('SELEC.....') its working..... what could be the problem?... anyone have any idea about this ? Thanks in advance.... ~J Link to comment https://forums.phpfreaks.com/topic/54699-so-weired/ Share on other sites More sharing options...
cooldude832 Posted June 8, 2007 Share Posted June 8, 2007 show us $sql please Link to comment https://forums.phpfreaks.com/topic/54699-so-weired/#findComment-270502 Share on other sites More sharing options...
kdsxchris Posted June 8, 2007 Share Posted June 8, 2007 And how are you called the method? Link to comment https://forums.phpfreaks.com/topic/54699-so-weired/#findComment-270504 Share on other sites More sharing options...
jaikar Posted June 8, 2007 Author Share Posted June 8, 2007 'SELECT cron_last_run_date FROM tbl_process' .. i call the function this way... $query = 'SELECT cron_last_run_date FROM tbl_process' ; $result = $dbase->run($query); Link to comment https://forums.phpfreaks.com/topic/54699-so-weired/#findComment-270505 Share on other sites More sharing options...
btherl Posted June 8, 2007 Share Posted June 8, 2007 Please show us your entire script, and the full class definition. If you want to show a small example, please make sure it demonstrates the problem you are seeing. Link to comment https://forums.phpfreaks.com/topic/54699-so-weired/#findComment-270507 Share on other sites More sharing options...
jaikar Posted June 8, 2007 Author Share Posted June 8, 2007 its working now !.. the problem was, the way i called it !... sorry about this !. Thanks !! Link to comment https://forums.phpfreaks.com/topic/54699-so-weired/#findComment-270523 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.