Hello everybody,
Problem with the following statement, uniquemerchantid in some instance is blank but as you can see from the output i copy/pasted at the bottom its repeating the results due to empty fields.
Any help you can give me would be greatly appreciated.
$stmt = $this->dbcon1 ->query("SELECT
tbl_merchant.merchantname,
tbl_questions.projectid,
tbl_questions.merchantid,
tbl_questions.question,
tbl_questions.date
FROM tbl_questions
LEFT OUTER
JOIN tbl_merchant
ON tbl_merchant.uniquemerchantid = tbl_questions.merchantid
WHERE tbl_questions.projectid = '$this->projectId' ");
part of the output
Array
(
[0] => Array
(
[merchantname] => Cakewalk
[projectid] => 096675edc895d5d03667e15c47d94e6651559e5e8ec36
[merchantid] => 666ee17c24f8c73d25be1dbf2e85ea6951537ab7da5f4
[question] => 1-0How big is your kitchen?
[date] => 2013-04-26 11:14:00
)
[1] => Array
(
[merchantname] => Borland
[projectid] => 096675edc895d5d03667e15c47d94e6651559e5e8ec36
[merchantid] => ecb6bfe5ae52b191689adc1e41cd875c51733f8108552
[question] => 2-1 are there tiles installed in your kitchen and when where they installed?
[date] => 2013-04-26 11:14:22
)
[2] => Array
(
[merchantname] => Borland
[projectid] => 096675edc895d5d03667e15c47d94e6651559e5e8ec36
[merchantid] => ecb6bfe5ae52b191689adc1e41cd875c51733f8108552
[question] => 3-2 more test questions and answerthere tiles installed in your kitchen and when where they installed?
[date] => 2013-04-26 11:14:41
)
[3] => Array
(
[merchantname] => Microsoft
[projectid] => 096675edc895d5d03667e15c47d94e6651559e5e8ec36
[merchantid] =>
[question] => 4-3 replay from the person posted the project 1
[date] => 2013-04-28 16:24:25
)
[4] => Array
(
[merchantname] => Adobe
[projectid] => 096675edc895d5d03667e15c47d94e6651559e5e8ec36
[merchantid] =>
[question] => 4-3 replay from the person posted the project 1
[date] => 2013-04-28 16:24:25
)
[5] => Array
(
[merchantname] =>
[projectid] => 096675edc895d5d03667e15c47d94e6651559e5e8ec36
[merchantid] =>
[question] => 4-3 replay from the person posted the project 1
[date] => 2013-04-28 16:24:25
)