Results 1 to 5 of 5

Thread: hello guys!

  1. #1

    Default hello guys!


    Is there a way to store audio file into mysql? if yes! Can you show me how?

  2. #2

    Default Re: hello guys!

    It's better to store audio files in dir on your server and put path in MySQL field.

  3. #3

    Default Re: hello guys!

    Quote Originally Posted by insic_19
    It's better to store audio files in dir on your server and put path in MySQL field.
    yes! this is the right procedure to do!

    @docepares do you still practice docepares?

  4. #4

    Default Re: hello guys!

    they all right bai. 1 reason that it didn't store and mysql didn't support of audio - huge file to retrieve and save.
    But if your reason why you store it in database is security. Just try to look at other procedure or either just encode it.

    I will give you other tip, if you want to.
    Try to this php code. If you don't know yet to store your image in mysql database.
    /**
    * This is the database I used temporarily
    * Test Database Structure
    * ------------------------
    * images CREATE TABLE `images` (
    `id` int(4) unsigned NOT NULL auto_increment,
    `image` longblob,
    PRIMARY KEY (`id`)
    ) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci
    */


    // Zend framework
    require_once 'Zend/Db.php';
    try
    {
    $db = Zend_Db::factory('Pdo_Mysql',
    array('host' => 'localhost',
    'username' => 'root',
    'password' => '',
    'dbname' => 'test'));
    } catch(Exception $e) { print $e->getMessage(); }

    // get the file
    $file = file_get_contents('store.png');

    $data = array(
    'image' => $file
    );

    // Save your images
    $db->insert('images', $data);

    // Close DB
    $db->closeConnection();

    tnx

  5. #5

    Default Re: hello guys!

    All right, Thanks a lot guys!

  6.    Advertisement

Similar Threads

 
  1. Hello guys please help me..
    By newsprint_kuno in forum General Discussions
    Replies: 3
    Last Post: 01-02-2010, 12:13 PM
  2. Replies: 2
    Last Post: 06-11-2009, 12:25 AM
  3. hello guys help me...
    By jouho in forum Computer Hardware
    Replies: 7
    Last Post: 03-03-2008, 03:12 PM
  4. hello guys... I need SDRAM for Laptop!!!!
    By mj2 in forum Computer Hardware
    Replies: 1
    Last Post: 09-28-2007, 02:09 PM
  5. Replies: 2
    Last Post: 06-07-2007, 08:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top