HI, first put mysql-connector-java-5.0.4-bin.jar in the lib directory and
update the file library.properties, then in the Application you can use
something like:
import java.sql.*;
.
.
.
try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection con =
DriverManager.getConnection("jdbc:mysql://server/database?user=myusername&pa
ssword=mypassword");
try {
Statement stat = con.createStatement();
ResultSet rs = stat.executeQuery("SELECT * from user");
while (rs.next()) {
int someint = rs.getInt(1);
String somestr = rs.getString(2);
System.out.printf("id: %d name: %s\n",someint,somestr);
}
} finally
{
con.close();
}
} catch (Exception e) {
e.printStackTrace();
}
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Oliver Müller
Sent: Thursday, January 18, 2007 9:45 AM
To: [email protected]
Subject: [Red5] application with mysql
Hi,
I'm looking for a tutorial that explains how to connect to a mysql database
within my Red5 app and maybe an example "select" or "insert".
I thought there must be someone who has already done this :-)
I only used MySQL in combination with PHP until now.
--
greets,
Olli
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org