Tryag File Manager
Home
-
Turbo Force
Current Path :
/
home
/
cluster1
/
data
/
bu01
/
1121861
/
html
/
jlex
/
nahuatl
/
xfst_dir
/
Upload File :
New :
File
Dir
//home/cluster1/data/bu01/1121861/html/jlex/nahuatl/xfst_dir/test_db.php
<? function unhtmlentities ($string) { $trans_tbl = get_html_translation_table (HTML_ENTITIES); $trans_tbl = array_flip ($trans_tbl); $out = fopen("val.txt","w"); $length = strlen($string); for($i=0;$i<$length;$i++) { $char = $string[$i]; //echo $char."<BR>"; fwrite($out,$char."\n"); //$ret .= $char; } fclose($out); $ret = strtr ($string, $trans_tbl); return preg_replace('/&#(\d+);/me', "chr('\\1')",$ret); } $DATABASE = "10832_balsas_nahuatlorg"; $HOST = "mysql1.myregisteredsite.com"; $USER = "10832_user1121861"; $PASSWORD = "pcw6zmeqhy"; @ $db = mysql_pconnect($HOST, $USER, $PASSWORD); if(!$db) { echo "Error: Could not connect to database. Please try again later.<BR>"; echo "Error Type: ".mysql_error(); exit; } mysql_select_db($DATABASE); $query_result = mysql_query("select name, user_name(uid) from sysobjects where type='U'"); echo $query_result; /*$in = fopen("queries.emacs","r"); $query = "select name, user_name(uid) from sysobjects where type='U'"; $query = utf8_decode($query); echo "query: $query <BR>"; $query_result = mysql_query($query); */ echo "num_results: ".mysql_num_rows($query_result)."<BR>"; while($row = mysql_fetch_assoc($query_result)) { /* $name = $row["refgroup_id"];*/ echo "<b>id:</b> $name <BR>"; } echo mysql_error(); /* $trans_tbl = get_html_translation_table(HTML_ENTITIES); //$trans_tbl = array_flip ($trans_tbl); foreach($trans_tbl as $key=>$value) { $length = strlen($key); echo "$key ($length): $value <BR>"; } echo "test: ".$trans_tbl["?"]."<BR>"; */ ?>