On Sun, Jun 16, 2013 at 6:29 PM, dealTek wrote:
> Hi all,
>
> newbie PDO question...
>
> I think (hard to tell - buried in a wrapper class) I am doing a select
> query using - PDO::FETCH_ASSOC like...
>
> wrapper -- return $pdostmt->fetchAll(PDO::FETCH_ASSOC);
>
> ---
>
> so my query is like
>>
>>
> When you know there is only one row to be returned you can do this:
>
> $photo_category_list = "";
> $SQL = "SELECT category_id, category_name FROM gallery_category ORDER by
> category_order";
> try {
> $stmt = $dbh->prepare($SQL);
> $stmt->execute();
> list( $id,
dealTek wrote:
>
>On Jun 16, 2013, at 3:37 PM, Stephen wrote:
>
>> Here is a sample from my code:
>>
>> $photo_category_list = "";
>>$SQL = "SELECT category_id, category_name FROM gallery_category
>ORDER by category_order";
>>try {
>>$stmt = $dbh->prepare($SQL);
>>$stm
On Jun 16, 2013, at 3:37 PM, Stephen wrote:
> Here is a sample from my code:
>
> $photo_category_list = "";
>$SQL = "SELECT category_id, category_name FROM gallery_category ORDER by
> category_order";
>try {
>$stmt = $dbh->prepare($SQL);
>$stmt->execute();
>whil
4 matches
Mail list logo