Note that there are some explanatory texts on larger screens.

plurals
  1. POYii Bootstrap Gridview and CSqlDataProvider has no $data variable.
    primarykey
    data
    text
    <p>Below I have included some code from my model and my view. It tells me that the $date variable does not exist. I dont understand why it wouldnt. I am changing over from it being objects so thats why some of the old code still has $data-> and why its being changed to $data['']. Regardless its now telling me that $data does not exist. </p> <p>This is the code from my view.</p> <pre><code>&lt;?php $this-&gt;widget('bootstrap.widgets.TbGridView', array( 'type'=&gt;'condensed', 'dataProvider'=&gt;$gridDataProvider, 'template'=&gt;"{items}", 'columns'=&gt;array( array('name'=&gt;'id', 'header'=&gt;'Name'), array('name'=&gt;'emax', 'header'=&gt;'Employees' 'value'=&gt;$date['id']), /*array('name'=&gt;'location', 'value'=&gt;'$data-&gt;city . ", " . $data-&gt;state-&gt;name', 'header'=&gt;'Location'), array('name'=&gt;'phone', 'header'=&gt;'Phone'), array('name'=&gt;'website', 'header'=&gt;'Website'), array( 'class'=&gt;'bootstrap.widgets.TbButtonColumn', 'htmlOptions'=&gt;array('style'=&gt;'width: 50px'), 'template'=&gt;"{view}", 'buttons'=&gt;array( 'view'=&gt;array( 'url'=&gt;'Yii::app()-&gt;createUrl("account/rinkdetail", array("id"=&gt;$data-&gt;id))', ), ), ),*/ ), )); ?&gt; </code></pre> <p>This is the code from my model</p> <pre><code>$sql="SELECT buyer.id, emax.max as emax, emin.min as emin, rmin.min as rmin, rmin.max as rmax, firm.name as firm, region.name as region, project.name as project FROM buyer LEFT JOIN buyer_target target on buyer.id=target.buyer_id LEFT JOIN employee emax on emax.id=target.max_employee_id LEFT JOIN employee emin on emin.id=target.min_employee_id LEFT JOIN revenue rmax on rmax.id=target.max_revenue_id LEFT JOIN revenue rmin on rmin.id=target.min_revenue_id LEFT JOIN buyer_target_firm tfirm on buyer.id=tfirm.buyer_id LEFT JOIN firm on firm.id=tfirm.firm_id LEFT JOIN buyer_target_project tproject on buyer.id=tproject.buyer_id LEFT JOIN project on project.id=tproject.project_id LEFT JOIN buyer_target_region tregion on buyer.id=tregion.buyer_Id LEFT JOIN region on region.id=tregion.region_id"; $gridDataProvider = new CSqlDataProvider($sql); return $gridDataProvider; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload