Showing posts with label PHP. Show all posts
Showing posts with label PHP. Show all posts

Thursday, June 5, 2014

Change ‘Edit Top 200 Rows" on SQL 2008

Working with live data and 'concerned' clients, i always have to recheck and modify data from database using SQL 2008. 

The default value for editing table only 200 rows, and the rest i have to do it using script. A bit tedious because i cannot actually read the data and edit it. 

But here is the solution yey :D

Tools >Options >SQL Server Object Explorer, Expand this tree ‘Commands’

I change the '200' to 0 , and i will get all data :)
Hope this will help :)

Thursday, February 27, 2014

Get image details using PHP


Syntax

list($width, $height, $type, $attr) = getimagesize("image_name.jpg");

Code

This is a sample code, change image_name to your image name and test it!

list($width, $height, $type, $attr) = getimagesize("image_name.jpg");

echo "Image width " .$width;
echo "
";
echo "Image height " .$height;
echo "
";
echo "Image type " .$type;
echo "
";
echo "Attribute " .$attr;

?>
Simple rite :)

Wednesday, October 2, 2013

What is actually in my mind..

I am a programmer or some people call it system developer. My work is to do the thinking other people don't want to do- that's what i do for a living. I think.

I like to think and do calculation and making logic. My judgement is only based on math and logic and structure. If the math is correct, does it logic? If its logic will it provide a good structure for the foundation?
When all lead to YES, then i will start typing my codes, hundreds and thousands of lines, to build one perfect system for the client.

When i work, i love quite uninterrupted place. Where i can do all the math inside my brain before my fingers start moving typing the codes. When the logic become hard, my brain work really hard and i will be easily annoyed even with simple not-so-funny conversation.

Programmers is not weird person, they just being themselves, thinking and structuring. Well at least they are more realistic than some people who converse a lot or very loud but well an empty can. Not all, some people can be very loud but they have the brain or at least vision in life.

I might be very quiet ( sometimes ), that is when i analyzing new people or people i don't really know. I prefer to absorb all the talking rather than do the talking. Sometimes i just laugh at some stupid boasting talk some people will do to impress other people. Gosh, maybe the saying "It's better to keep silent and be thought as a fool , than to speak and remove all doubt" is indeed true :)

So when some people very quiet, don't simply judge them by saying they have the cruelest mind or cold or stupid or do not mingle or whatever negative judgment you have in mind. before you put any judgment on other person, make sure you are perfect. If not, you just another dog who bark the loudest but doesn't bite. After all action is better than just mere talking rite? :)


Tuesday, January 8, 2013

Wrong 'Loaded Configuration File' path on phpinfo

That's killing me!

My phpinfo(Loaded Configuration File still pointing to my other php. I have 3 different servers in my machine. WAMP Apache, IIS and hardened Apache. 

Solution? :D

Just add this at Apache configuration : httpdconf, and walla! Happy happy.. :D . Or you can read more here


AddType application/x-httpd-php .php
PHPIniDir "C:/Program Files/PHP5"

Thursday, October 25, 2012

PHP : Deprecated: mysql_escape_string()


The website that i currently working on now in a final stage where it need to be uploaded and setup at the client's server.

And i actually just waste my 30 minute trying to figure out what's went wrong with all my codes after I push the script to production server.

I am using mysql_escape_string() in most of my pages and now i get this error :


How to solve? Simple haha:


mysql_escape_string is not depreciated from 5.3 but, for 4.3.0 and above. So any One using PHP version above/or 4.3.0 should use mysql_real_escape_string


So thats it :)

Related Posts with Thumbnails