W
worldcyclist
Any one have an idea why this first statement works just fine....
-------------------------------------------------------------------
($iso, $name, $size, $location) = $dbh->selectrow_array("SELECT `iso`,
`name`, `size`, `location` FROM `country_lookup` WHERE `name` =
\"France\"");
This works fine and this works fine also....
--------------------------------------------
$country_name = "France";
($iso, $name, $size, $location) = $dbh->selectrow_array("SELECT `iso`,
`name`, `size`, `location` FROM `country_lookup` WHERE `name` =
\"$country_name\"");
Where I am having a problem is if I try this....
--------------------------------------------------------
($country_name) = $dbh->selectrow_array('SELECT `category_label` FROM
`mt_category` WHERE `category_id` = '.$placement_category_id);
($iso, $name, $size, $location) = $dbh->selectrow_array("SELECT `iso`,
`name`, `size`, `location` FROM `country_lookup` WHERE `name` =
\"$country_name\"");
Invariably (no pun intended) I get this error....
Use of uninitialized value in concatenation (.) or string at......
I have used the variable $country_name in later places and it is fine.
Has anyone else experienced this?
Many thansk in advance...
Wilkie
-------------------------------------------------------------------
($iso, $name, $size, $location) = $dbh->selectrow_array("SELECT `iso`,
`name`, `size`, `location` FROM `country_lookup` WHERE `name` =
\"France\"");
This works fine and this works fine also....
--------------------------------------------
$country_name = "France";
($iso, $name, $size, $location) = $dbh->selectrow_array("SELECT `iso`,
`name`, `size`, `location` FROM `country_lookup` WHERE `name` =
\"$country_name\"");
Where I am having a problem is if I try this....
--------------------------------------------------------
($country_name) = $dbh->selectrow_array('SELECT `category_label` FROM
`mt_category` WHERE `category_id` = '.$placement_category_id);
($iso, $name, $size, $location) = $dbh->selectrow_array("SELECT `iso`,
`name`, `size`, `location` FROM `country_lookup` WHERE `name` =
\"$country_name\"");
Invariably (no pun intended) I get this error....
Use of uninitialized value in concatenation (.) or string at......
I have used the variable $country_name in later places and it is fine.
Has anyone else experienced this?
Many thansk in advance...
Wilkie