<?php
$conn = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$conn) {
die('Could not connect: ' . mysql_error());
}mysql_select_db('database');$result = mysql_query('select * from table');
if (!$result) {
die('Query failed: ' . mysql_error());
}/* get column metadata */$i = 0;
while ($i < mysql_num_fields($result)) {
echo "Information for column $i:<br />\n";
$meta = mysql_fetch_field($result, $i);
if (!$meta) {
echo "No information available<br />\n";
}
echo "<pre>
blob: $meta->blob
max_length: $meta->max_length
multiple_key: $meta->multiple_key
name: $meta->name
not_null: $meta->not_null
numeric: $meta->numeric
primary_key: $meta->primary_key
table: $meta->table
type: $meta->type
unique_key: $meta->unique_key
unsigned: $meta->unsigned
zerofill: $meta->zerofill
</pre>";
$i++;
}mysql_free_result($result);?>
source: http://php.net/manual/en/function.mysql-num-fields.php
Senin, 07 November 2016
Rabu, 28 September 2016
FastR3port for .NET
Report1.Dictionary.Connections(0).ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
Application.StartupPath & "\keuangan.mdb;User ID=Admin;Jet OLEDB:Database Password=+"
Report1.Preview = PreviewControl1
Report1.Show()
Application.StartupPath & "\keuangan.mdb;User ID=Admin;Jet OLEDB:Database Password=+"
Report1.Preview = PreviewControl1
Report1.Show()
Senin, 05 September 2016
OpenWRT Raspberry
Mount Storage
vi /etc/config/fstab
/etc/init.d/fstab start
reboot
mount
opkg update opkg install kmod-usb-storage block-mount block-hotplug kmod-fs-ext4 kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1 mkdir -p /home mount -t vfat /dev/sda1 /home
vi /etc/config/fstab
config mount
option target '/home'
option device '/dev/sda1'
option fstype 'vfat'
option enabled '1'
option options 'rw,sync'
option enabled_fsck '0'
/etc/init.d/fstab enable/etc/init.d/fstab start
reboot
mount
Senin, 22 Agustus 2016
OLEDB acces vb.net
Dim cnn As New _
OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
this.appDir & "\data\keuangan.mdb;Jet OLEDB:Database Password=ppp;")
' OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & _
' this.appDir & "\data\keuangan.mdb;Jet OLEDB:Database Password=ppp;")
Dim cmd As New OleDb.OleDbCommand
cmd.Connection = cnn
cmd.CommandType = CommandType.Text
cmd.CommandText = "delete * from trx_spp where `nospp` = '" & e.Link.Split("|")(1) & "' and " & this.sFilter
Using cnn
cnn.open()
cmd.ExecuteNonQuery()
cnn.Close()
End Using
=======================
'Friend koneksi As New _
' Odbc.OdbcConnection("Driver={Microsoft Access Driver (*.mdb)};dbq=" & _
' this.appDir & "\data\keuangan.mdb;defaultdir=D:\;Uid=Admin;Pwd=-+--+;")
'Friend koneksi As New _
' OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & _
' this.appDir & "\data\keuangan.mdb;Jet OLEDB:Database Password=-+--;")
Friend koneksi As New _
OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
this.appDir & "\data\keuangan.mdb;Persist Security Info=False;Jet OLEDB:Database Password=-+;")
OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
this.appDir & "\data\keuangan.mdb;Jet OLEDB:Database Password=ppp;")
' OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & _
' this.appDir & "\data\keuangan.mdb;Jet OLEDB:Database Password=ppp;")
Dim cmd As New OleDb.OleDbCommand
cmd.Connection = cnn
cmd.CommandType = CommandType.Text
cmd.CommandText = "delete * from trx_spp where `nospp` = '" & e.Link.Split("|")(1) & "' and " & this.sFilter
Using cnn
cnn.open()
cmd.ExecuteNonQuery()
cnn.Close()
End Using
=======================
'Friend koneksi As New _
' Odbc.OdbcConnection("Driver={Microsoft Access Driver (*.mdb)};dbq=" & _
' this.appDir & "\data\keuangan.mdb;defaultdir=D:\;Uid=Admin;Pwd=-+--+;")
'Friend koneksi As New _
' OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & _
' this.appDir & "\data\keuangan.mdb;Jet OLEDB:Database Password=-+--;")
Friend koneksi As New _
OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
this.appDir & "\data\keuangan.mdb;Persist Security Info=False;Jet OLEDB:Database Password=-+;")
Rabu, 17 Agustus 2016
Redirect using .htaccess
Redirect include subfolder
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^layanankilat\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.layanankilat\.com$
RewriteRule (.*)$ http://prosides.magelangsoft.com/$1 [R=301,L]
</IfModule>
Redirect without subfolder<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^situsdesa\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.situsdesa\.com$
RewriteRule (.*)$ http://www.zheol.com/ [R=301,L]
</IfModule>
Redirect to root folder<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^.+$ / [R=301,NC,L]
</IfModule>
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Redirect non to https
RewriteCond %{HTTP_HOST} ^pastioke\.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://pastioke.com/$1 [R,L]
sumber : cholar.com/blog/redirect-an-old-domain-to-a-new-domain-with-htaccess/
Senin, 25 Juli 2016
Application Location on VB.net EXE path
Application Location on VB.net EXE path
From dll
exe path = System.Windows.Forms.Application.StartupPath()
from exe
exe path = Application.StartupPath
appDir As String = Application.StartupPath.Substring(0, Application.StartupPath.LastIndexOf("\"))
appExePath As String = Application.StartupPath
appname As String = IO.Path.GetFileNameWithoutExtension(Application.ExecutablePath).ToUpper
From dll
exe path = System.Windows.Forms.Application.StartupPath()
from exe
exe path = Application.StartupPath
appDir As String = Application.StartupPath.Substring(0, Application.StartupPath.LastIndexOf("\"))
appExePath As String = Application.StartupPath
appname As String = IO.Path.GetFileNameWithoutExtension(Application.ExecutablePath).ToUpper
Selasa, 03 Mei 2016
Mikrotik WDS Wifi
Topologi
Topologi wifi yang akan kita buat sbb
Setting wifi mikrotik dengan setting sbb: Pastikan frequencynya sama dengan chanel pada AP murah
Buat interfacen baru untuk bridge wds
Kemudian pilih access list, masukkan mac yang akan kita wdskan
Kemudian pilih conect list, masukkan mac yang akan kita wdskan
Topologi wifi yang akan kita buat sbb
Setting wifi mikrotik dengan setting sbb: Pastikan frequencynya sama dengan chanel pada AP murah
Buat interfacen baru untuk bridge wds
Kemudian pilih access list, masukkan mac yang akan kita wdskan
Kemudian pilih conect list, masukkan mac yang akan kita wdskan
Langganan:
Postingan (Atom)
-
Tutorial ini menjelaskan bagaimana menghapus blog di blogger. Pertama, anda harus login ke blogger.com, kemudian pilih blog yang hendak anda...
-
a < script > /** * sends a request to the specified url from a form. this will change the window location. * @param {string} path th...
-
function popup ( idbrg ){ $.ajax({ type : 'POST', url : '?plain=app/barang-harga.php...