Online library

Reply

Join Date: Nov 2005
Posts: 44
Reputation: Brims is an unknown quantity at this point 
Solved Threads: 0
Brims Brims is offline Offline
Light Poster

Online library

 
0
  #1
Mar 27th, 2006
Im building an online music video library with php can anyone point me out getting it wrking with the database
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 354
Reputation: Troy is an unknown quantity at this point 
Solved Threads: 5
Troy's Avatar
Troy Troy is offline Offline
Posting Whiz

Re: Online library

 
0
  #2
Mar 27th, 2006
I'm a nice guy, but I got to say, RTFM. The code examples in the PHP documentation are VERY good. It is unlikely that anyone here is going to explain it more simply than the PHP documentation.

You did not mention what database you want to use, but lets assume MySQL. Here is a link to PHP's MySQL-related functions.
http://www.php.net/manual/en/ref.mysql.php

From the link above:
[PHP] <?php
// Connecting, selecting database
$link = mysql_connect('mysql_host', 'mysql_user', 'mysql_password')
or die('Could not connect: ' . mysql_error());
echo 'Connected successfully';
mysql_select_db('my_database') or die('Could not select database');

// Performing SQL query
$query = 'SELECT * FROM my_table';
$result = mysql_query($query) or die('Query failed: ' . mysql_error());

// Printing results in HTML
echo "<table>\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo "\t<tr>\n";
foreach ($line as $col_value) {
echo "\t\t<td>$col_value</td>\n";
}
echo "\t</tr>\n";
}
echo "</table>\n";

// Free resultset
mysql_free_result($result);

// Closing connection
mysql_close($link);
?> [/PHP]
Troy Wolf is the author of SnippetEdit. "Website editing as easy as it gets." IX Web Hosting
Reply With Quote Quick reply to this message  
Join Date: Nov 2005
Posts: 44
Reputation: Brims is an unknown quantity at this point 
Solved Threads: 0
Brims Brims is offline Offline
Light Poster

Re: Online library

 
0
  #3
Mar 27th, 2006
The database is my sql i have connected to the database

itsuite.it.bton.ac.uk/student/iak/m

with the join form

i want to have a database with music link it to an API or something so that the database will have music on it so it can be streamed to a browser or mobile phone and pda devices
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC