PHP Coding Solutions

php coding solution, form validation

Thursday, February 12, 2015

show table columns in mysql

$query = "SHOW COLUMNS FROM zen_products";
        if($output = mysql_query($query)):
            $columns = array();
            while($result = mysql_fetch_assoc($output)):
                $columns[] = $result['Field'];
            endwhile;
        endif;
        echo '<pre>';
        print_r($columns);
        echo '</pre>';
Posted by Magento at 2:44 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Blog Archive

  • ►  2020 (1)
    • ►  June (1)
  • ►  2019 (7)
    • ►  July (2)
    • ►  June (2)
    • ►  May (1)
    • ►  April (2)
  • ►  2018 (5)
    • ►  October (4)
    • ►  September (1)
  • ►  2017 (7)
    • ►  October (1)
    • ►  June (1)
    • ►  May (3)
    • ►  April (1)
    • ►  March (1)
  • ►  2016 (7)
    • ►  December (1)
    • ►  November (1)
    • ►  August (2)
    • ►  June (1)
    • ►  March (2)
  • ▼  2015 (9)
    • ►  December (1)
    • ►  November (1)
    • ►  September (3)
    • ►  July (1)
    • ►  June (1)
    • ►  May (1)
    • ▼  February (1)
      • show table columns in mysql
  • ►  2014 (11)
    • ►  September (1)
    • ►  August (1)
    • ►  April (2)
    • ►  March (4)
    • ►  January (3)
  • ►  2013 (13)
    • ►  December (3)
    • ►  November (1)
    • ►  September (4)
    • ►  August (4)
    • ►  July (1)

About Me

Magento
View my complete profile
Simple theme. Powered by Blogger.