seany123 Posted June 21, 2009 Share Posted June 21, 2009 Here is another little error im getting.. its quite late here and im getting quite tired, so im making silly mistakes. $replies=$db->execute("select * from `forum_posts` where `parent`=?",array($t['id']))->recordcount(); could anyone fix this for me? Link to comment https://forums.phpfreaks.com/topic/163080-parse-error-syntax-error-unexpected-t_object_operator/ Share on other sites More sharing options...
trq Posted June 21, 2009 Share Posted June 21, 2009 The array() function returns an array, not an object. Link to comment https://forums.phpfreaks.com/topic/163080-parse-error-syntax-error-unexpected-t_object_operator/#findComment-860458 Share on other sites More sharing options...
seany123 Posted June 21, 2009 Author Share Posted June 21, 2009 so how should this be written? Link to comment https://forums.phpfreaks.com/topic/163080-parse-error-syntax-error-unexpected-t_object_operator/#findComment-860463 Share on other sites More sharing options...
trq Posted June 21, 2009 Share Posted June 21, 2009 Sorry, I did misread your code earlier. Without knowing what DB abstraction layer your using we couldn't really help. Does the execute() method your using return an object? Link to comment https://forums.phpfreaks.com/topic/163080-parse-error-syntax-error-unexpected-t_object_operator/#findComment-860472 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.