| |
Forum PHP IndonesiaDapatkan pertolongan pertama pada kebingungan PHP dan sekitarnya |
|
|
|
|
|
| |
|
|
All times are GMT + 7 Hours
|
|
koneksi database ke sql server 2005 dengan php
 |
Sat Apr 24, 2010 16:33 |
 |
Author |
Message |
bparwita PHPnewbie

Joined: 06 Apr 2010 Posts: 5
|
| Post subject: koneksi database ke sql server 2005 dengan php |
|
|
| Gw baru banget dengan web. Gimana caranya ya konek ke database sql server 2005 dengan php ? Aku punya table yang akan aku tampilakan di web. Ada setingan khusus gak ya ? Thanks sebelumnya |
|
| |
|
|
 |
Thu May 06, 2010 20:09 |
 |
Author |
Message |
madkixt PHP Master


Joined: 25 Aug 2008 Posts: 261
|
| Post subject: |
|
|
ada koq settingannya googling aja
aq xampp 1.7, database SQL Server 2005
ada tuh blog yg ngasi cara2nya... |
|
| |
|
|
 |
Tue Jul 06, 2010 20:32 |
 |
Author |
Message |
andriant Jagoan PHP


Joined: 31 Mar 2010 Posts: 911 Location: Jakarta
|
| Post subject: |
|
|
bisa via mssql, bisa pake odbc
kalo mssql bisa diliat di:
http://php.net/manual/en/book.mssql.php
kalo odbc contohnya:
| Code: | <?php echo "How many users logged in last week";
//Connect to the database
$connect = odbc_connect("Driver={SQL Server};Server=$host;Database=$db","$user","$pass") or die("Could not connect to the database");
//Basic query, salt to taste
$query = "SELECT COUNT(user_id) from USERS";
// actually run the query
$result = odbc_exec($connect, $query);
//iterate through the results to test
while(odbc_fetch_row($result)) {
odbc_result_all($result);
};
odbc_close($connect); ?> |
|
|
| |
|
|
 |
Wed Jul 07, 2010 13:35 |
 |
Author |
Message |
hoirul PHPnewbie


Joined: 07 Jul 2010 Posts: 17
|
| Post subject: |
|
|
halo...
FYI, untuk koneksi odbc sangat lah tidak disarankan untuk penggunaan databases yang lumayan besar.. _________________ <barcoding system >
me..^_^ |
|
| |
|
|
 |
Mon Jul 12, 2010 10:17 |
 |
Author |
Message |
Jang743 Anak Baru

Joined: 12 Jul 2010 Posts: 2 Location: indonesia
|
| Post subject: |
|
|
pake aja xampp ..
coba liat setingan di xamp -> php php.ini
hapus aja tanda ; pada extension=php_mssql.dll tpi biasanya untuk xampp sudah default ..
tiinggal settng aja sama kayak mysql ,,
db_server nya apa ?
db_username nya apa ?
db_password nya apa ?
db_database nya apa ? |
|
| |
|
|
 |
Mon Jul 12, 2010 10:37 |
 |
Author |
Message |
andriant Jagoan PHP


Joined: 31 Mar 2010 Posts: 911 Location: Jakarta
|
| Post subject: |
|
|
| hoirul wrote: | halo...
FYI, untuk koneksi odbc sangat lah tidak disarankan untuk penggunaan databases yang lumayan besar.. |
bro, bisa share pengalaman kenapa ODBC tidak disarankan?
soalnya dari pengalaman yang ane coba:
1. ODBC lebih cepet prosesnya dari fungsi bundle MSSQL daripada MSSQL Function bawaan
2. dan Microsoft lebih mensupport ODBC dalam MSSQLnya
3. (cuma feeling) sepertinya php lebih memaintenance fungsi ODBC daripada MSSQL functionnya.
walaupun ane juga masih tetep sering pake mssql function sih. |
|
| |
|
|
 |
Sun Jan 16, 2011 21:38 |
 |
Author |
Message |
hoirul PHPnewbie


Joined: 07 Jul 2010 Posts: 17
|
| Post subject: |
|
|
halo om andriant,
memang aku belm pernah menggunakan php untuk koneksi ODBC,
aku pakai VB6 untuk aplikasi yang kupakai..
dan hasilnya jauh......beda dibandingkan secara langsung ^_^
just share..hehe _________________ <barcoding system >
me..^_^ |
|
| |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
|
|
|
|
Powered by phpBB © 2001, 2002 phpBB Group
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|