Hi,
I am trying this query
$sqlQuery = new SQLQuery();
$sqlQuery->select = array(
'ProductName AS ProductName',
'Industry AS Industry',
'Type AS Type',
'Serving AS Serving',
'Info AS Info',
'ReviewsBuzz AS ReviewsBuzz',
'Technology AS Technology',
'WhatsCooking AS WhatsCooking'
);
$sqlQuery->from[] = "
SubProducts
";
$sqlQuery->where[] = "
ID = 1";
// get the raw SQL
$rawSQL = $sqlQuery->sql();
echo $rawSQL;
// execute and return a Query-object
return $result = $sqlQuery->execute();
But it did not return any thing ...
i tried this as echoing echo $rawSQL;
SELECT ProductName AS ProductName, Industry AS Industry, Type AS Type, Serving AS Serving, Info AS Info, ReviewsBuzz AS ReviewsBuzz, Technology AS Technology, WhatsCooking AS WhatsCooking FROM SubProducts WHERE ( ID = 1)
this is working fine in phpmyadmin ...
Also i tried
echo "<pre>";
print_r($result);
echo "</pre>";
it display me
MySQLQuery Object
(
[database:private] => MySQLDatabase Object
(
[dbConn:private] => Resource id #89
[active:private] => 1
[database:private] => SS_mysite
[mysqlVersion:private] =>
[tableList:protected] =>
[fieldList:protected] =>
[indexList:protected] =>
[schemaUpdateTransaction:protected] =>
[extension_instances:protected] => Array
(
)
[class] => MySQLDatabase
)
[handle:private] => Resource id #132
[currentRecord:private] =>
[rowNum:private] => -1
[extension_instances:protected] => Array
(
)
[class] => MySQLQuery
)
i am not getting how to get result from this ...
Please help me ...
Thanks in Advance