DOK Posted February 14, 2007 Share Posted February 14, 2007 Hi i'm very noobish when it comes to php and i could relly use some help with this as there is little to no help on google i keep getting this error: PHP Fatal error: Call to a member function getrows() on a non-object in /home/e-smith/files/ibays/Primary/html/include/function.php on line 570. function insert_video_channel($a) { global $conn; if($a[tbl]=="")$sqlx="channel from video where VID='$a[vid]'"; else $sqlx="channel from $a[tbl] where GID='$a[gid]'"; $sql="select $sqlx"; $rs=$conn->execute($sql); $a=$rs->fields['channel']; if($a!="") { $temp=explode("|",$a); if(count($temp)>=1) for($i=1;$i<count($temp);$i++) $list.=" or CHID=".$temp[$i]; $sql="select CHID,name from channel where CHID=$temp[0] $list"; $rsx=$conn->execute($sql); $res=$rsx->getrows(); ( This is the line its refering to #570) return $res; } Can someone explain to me what this does and how i can possibly fix this, This would be great, And can you let me know if i posted this in the right section or point me in the right direction, Thank you very much. DOK Link to comment https://forums.phpfreaks.com/topic/38406-im-confused-by-this-call-to-a-member-function-getrows-error/ Share on other sites More sharing options...
hitman6003 Posted February 14, 2007 Share Posted February 14, 2007 It means that the $rsx object has not been created. $rsx should be an instance of the class that contains the "getrows()" function. Link to comment https://forums.phpfreaks.com/topic/38406-im-confused-by-this-call-to-a-member-function-getrows-error/#findComment-184204 Share on other sites More sharing options...
DOK Posted February 14, 2007 Author Share Posted February 14, 2007 wow you people are quick, Thanks. Ok another noobish question how do i go about doing this, as you can tell i know nothing about php except how to create a database and enter the passwords, any help would be great, Thank you. Link to comment https://forums.phpfreaks.com/topic/38406-im-confused-by-this-call-to-a-member-function-getrows-error/#findComment-184209 Share on other sites More sharing options...
trq Posted February 14, 2007 Share Posted February 14, 2007 take a look here, its a great tutorial on working with databases in php. Link to comment https://forums.phpfreaks.com/topic/38406-im-confused-by-this-call-to-a-member-function-getrows-error/#findComment-184211 Share on other sites More sharing options...
DOK Posted February 14, 2007 Author Share Posted February 14, 2007 Thank you for the info, i have went and searched, however i dont know what to look for or what to do, I appologize for being a pest on this but to be honest i dont know what to do, Thank you Link to comment https://forums.phpfreaks.com/topic/38406-im-confused-by-this-call-to-a-member-function-getrows-error/#findComment-184256 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.