- Fri Sep 02, 2011 9:17 am
#14775
Thank you Amosbattos. The error message is gone however I have noticed one other problem. I tried to post a reply twice but it never showed up which is why I am starting this as a new topic. One of my query pulls dates and I am trying to assign it to a php array using the method below:
@@sql2 = "SELECT startdate FROM rent";
$result = executeQuery(@@sql2, "2892121264e5f8a6999d3d0092234115");
if (is_array($result))
{
$rent = array():
foreach ($result as $row)
$rent = $row['name'];
}
However the array is treating each number in the date field as a seperate value instead of treating each date as a whole value:
E.g. I am getting
$arr[0] = 2;
$arr[1] = 0;
$arr[2] = 1;
$arr[3] = 1;
$arr[4] = -;
$arr[5] = 0;
$arr[6] = 9;
etc.
instead of getting the result:
$arr[1] = '2011-09-18';
$arr[2] = '2011-10-07';
Any advice on how to get this result?
@@sql2 = "SELECT startdate FROM rent";
$result = executeQuery(@@sql2, "2892121264e5f8a6999d3d0092234115");
if (is_array($result))
{
$rent = array():
foreach ($result as $row)
$rent = $row['name'];
}
However the array is treating each number in the date field as a seperate value instead of treating each date as a whole value:
E.g. I am getting
$arr[0] = 2;
$arr[1] = 0;
$arr[2] = 1;
$arr[3] = 1;
$arr[4] = -;
$arr[5] = 0;
$arr[6] = 9;
etc.
instead of getting the result:
$arr[1] = '2011-09-18';
$arr[2] = '2011-10-07';
Any advice on how to get this result?