Not displaying Summary |
[eluser]GamingFusion[/eluser]
I am trying to get the summary of a show that i add to the database to display when the 3rd segment is present. for example theatre/show //Doesn't display the summary theatre/show/3 //displays the summary but its not displaying it at all if the segment is there or not. controller Code: function show() view Code: <div class="shows" style="width:95%; height:350px; margin-top:10px; overflow:auto;">
[eluser]Ben Edmunds[/eluser]
Change Code: if ($this->uri->segment(3) === TRUE) to Code: if ($this->uri->segment(3))
[eluser]GamingFusion[/eluser]
ok thanx man but now its not getting the database info i have it run the function getShow($this->uri->segment(3)) which should get lets says the 3rd row form the databse but it doesnt heres the error there are multiple but they all link to the same thing Quote:A PHP Error was encountered view Code: <div class="shows" style="width:95%; height:350px; margin-top:10px; overflow:auto;"> controller Code: function show() model Code: //getShow Function
[eluser]Rahul Anand[/eluser]
please check your queries. there must be a "Where" statement. is it there? if yes then when the 3rd segment is not present then it return "0". convert it to normal query without "where": statement if the 3rd segment is not there. then it will return Thanks Rahul Anand
[eluser]GamingFusion[/eluser]
Ok i switched up the code a bit and now i get a new error. error Quote:Fatal error: Call to undefined method stdClass::num_rows() in /home/theatre2/public_html/system/application/views/show.php on line 2 code Code: <div class="shows" style="width:95%; height:350px; margin-top:10px; overflow:auto;">
[eluser]Rahul Anand[/eluser]
Hi, had a look at your code. could you please mail me the file at [email protected]? Let me check it once. and please check out the "$single"......I am sure you are having some query binding problem. that's why it is showing num_rows as a undefined method. Thanks Rahul |
Welcome Guest, Not a member yet? Register Sign In |