Notice: Undefined offset: 1 in ['DOCUMENT_ROOT']/CMS/lib/database_functions.php on line 507

3 posts by 2 authors in: Forums > CMS Builder
Last Post: February 25, 2009   (RSS)

By (Deleted User) - February 25, 2009

I am creating a list in the section editor using an 'get options from MySQL query (advanced).

Q: SELECT DISTINCT room_type FROM cms_gallery //this query is valid and tested returning the correct results I would expect.

I want to use the data from one table so that I can later join them and cross reference the data on the public side.

I am getting this error: Notice: Undefined offset: 1 in ['DOCUMENT_ROOT']/CMS/lib/database_functions.php on line 507 for each result.

viewing the source of the 'pulldown box' in the CMS I see this

</tr>
Notice: Undefined offset: 1 in /home/mulletca/public_html/newsite/CMS/lib/database_functions.php on line 507

Notice: Undefined offset: 1 in /home/mulletca/public_html/newsite/CMS/lib/database_functions.php on line 507

Notice: Undefined offset: 1 in /home/mulletca/public_html/newsite/CMS/lib/database_functions.php on line 507

Notice: Undefined offset: 1 in /home/mulletca/public_html/newsite/CMS/lib/database_functions.php on line 507

Notice: Undefined offset: 1 in /home/mulletca/public_html/newsite/CMS/lib/database_functions.php on line 507

Notice: Undefined offset: 1 in /home/mulletca/public_html/newsite/CMS/lib/database_functions.php on line 507

Notice: Undefined offset: 1 in /home/mulletca/public_html/newsite/CMS/lib/database_functions.php on line 507

Notice: Undefined offset: 1 in /home/mulletca/public_html/newsite/CMS/lib/database_functions.php on line 507

Notice: Undefined offset: 1 in /home/mulletca/public_html/newsite/CMS/lib/database_functions.php on line 507
<tr>
<td class='fieldLabel'>Room Type</td>
<td>
<select name='detail_room_type'>
<option value=''>&lt;select&gt;</option>
<option value="Commercial Spaces" ></option>
<option value="Kitchen" ></option>
<option value="Laundry Rooms" ></option>

<option value="Bathroom" ></option>
<option value="Home Office" ></option>
<option value="Garage" ></option>
<option value="Bars" ></option>
<option value="Entertainment Media" ></option>
<option value="Entertainment/Media" ></option>
</select>
</td>
</tr>


So the value in the options are correct but something isnt working quite right. Thank you in advance for advice.

Re: [Dave] Notice: Undefined offset: 1 in ['DOCUMENT_ROOT']/CMS/lib/database_functions.php on line 507

By (Deleted User) - February 25, 2009

LOL, never wrote a query returning the same data twice but it worked perfectly. I will update today. Thank you!