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 Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.