www.webdeveloper.com
Results 1 to 15 of 38

Thread: [RESOLVED] PHP Confirm on Delete Confusion

Threaded View

  1. #31
    Join Date
    May 2007
    Location
    Las Vegas, NV
    Posts
    42
    With your last post . . . I get the same fetch() issue I started with . . . Line 15. Here is the page with the code . . . this is category_db.php

    PHP Code:
    <?php
    function get_categories() {
        global 
    $db;
        
    $query 'SELECT * FROM categories
                  ORDER BY categoryID'
    ;
        
    $result $db->query($query);
        return 
    $result;
    }

    function 
    get_category_name($category_id) {
        global 
    $db;
        
    $query "SELECT * FROM categories
                  WHERE categoryID = 
    $category_id";
        
    $category $db->query($query);
        
    $category $category->fetch();
        
    $category_name $category['categoryName'];
        return 
    $category_name;
    }
    ?>

    Specifically:


    PHP Code:
        $category $category->fetch(); 


    I left the page up if you wish to see it.
    Last edited by KandiLyons; 11-23-2013 at 05:26 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles