Thursday, September 3, 2009

0

From P67 million in 2001 to P144 million in 2008.

"Gloria Macapagal Arroyo failed to explain the dramatic increase in her net worth from P67 million in 2001 to P144 million in 2008." Read more

Monday, August 31, 2009

0

Fedor vs Lesnar is just a dream

I am really wondering how Fedor will going to perform if he will going fight inside the cage with Lesnar. BUT, this bout will only be a dream for UFC fans. Find out why in this link.. Brock vs Lesnar

Sunday, August 23, 2009

0

About Cebu

I have recently read the articles in this blog - Cebu: A Safe Place?. Please find time to read.
Thank you

Wednesday, March 18, 2009

0

How to connect to MySQL Database, SQL Query and Displaying Query Results using PHP scripts

After creating your database and tables in MySQL (PhpMyAdmin). You are now ready to connect to your database using the PHP script below.


////////////////////////////////////////////////
//
// We use the pre-defined function
mysql_connect("server","username","password"),
//
// since we are developing our website in localhost (your own machine), by default, we use
// localhost as our server, root as our username and no password.
//
// Note: You can always create a new database user with password
// protection in PhpMyAdmin. Thus, making it
// mysql_connect("localhost","yourUsername","yourPassword")
//
// and you can use any names for your variables during the PHP scripting. Just a suggestion,
// you should name your variables according to its use.
//
////////////////////////////////////////////////

$link = mysql_connect("server","username","password") or die("Cannot Connect to DB");

///////////////////////////////////////////////
//
// we declared and initialized a variable ($link) to hold the connection,
// after a successful MySQL connection, we are now going to select our database
// using mysql_select_db("yourDBName","yourMySQLConnection")
//
///////////////////////////////////////////////

mysql_select_db("yourDBName",$link);

///////////////////////////////////////////////
//
// after selecting your database, you are now ready to query.
// For SQL queries reference, click HERE.
//
///////////////////////////////////////////////

$sql = "SELECT * FROM yourTableName";
$result = mysql_query($sql);

while($show = mysql_fetch_array($result)){
echo $show['someFieldNameInYourTable'];
}

///////////////////////////////////////////////
//
// $sql holds the sql query string,
// $result holds the exact query using the function mysql_query("yourSQLQuery"),
// and mysql_fetch_array("resultOfYourSQLQuery") is responsible for getting the data from
// your query and displaying it using echo
//
///////////////////////////////////////////////
?>

There you have it. You can use this LINK for your PHP reference.

Thursday, February 12, 2009

2

x.x.x.x is not accessible...

I had a hard time troubleshooting a network connectivity to other PC in our workplace. The pop up error, "x.x.x.x is not accessible..." where x.x.x.x is the IP address of the PC you are trying to access through a network. The reason for this, is that the restricanonymous registry (start\run\regedit\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa) is set to 1 where it should be set to 0. Everytime I set the restricanonymous registry to 0, after couple seconds in changes back to 1. I have search the web for quiet some time now and found many reasons for this problem. One of those is that it is being manipulated by a process called svdhost.exe (worm) from the startup. And when I have tried locating the process, it does not exist in the registry. So what I did is, I checked every process running in the system through the "task manager" and search it on google. And I have found SCtri.exe which is a trojan/backdoor which is causing the problem (http://www.greatis.com/appdata/d/s/sctri.exe.htm). I automatically ended the process in the task manager and search "SCtri.exe" in the registry (start\run\regedit\Ctrl+f) and delete every time it returns a result (I have found 3 SCtri.exe running in different folders in the system). And finally, I have set the restrictanonymous to 0 and restart the PC. And it works. The problem was solved.

You can try this, if ever you will going to experience such problem.