Wednesday, January 12, 2011

PHP export mysql table to text file


Here is simple script which will help you a bit, to export all fields of your database table to text file. It will not be same as export of MyAdmin, but its better than nothing... at least you will have data.
$sql_export = "SELECT * INTO OUTFILE 'tables.txt' FROM `table_name` ";
//var_dump($sql_export);
if($result = mysql_query($sql_export))
echo "Recorded";
else echo "Not recorded";

Sunday, January 9, 2011

Joomla Error loading feed data



The error occurs after installing joomla.

So fix the thing all you need to do is:
1. go to administrator panels
2. Extensions -> Module Manager -> Administrator tab
3. Find "Joomla! Security Newsfeed"
4. Disable it
5. Done
If you have the “yoo_tweet module” installed, disable this module as well.  This module is known to display this error message.

Why:
Because this module load feed data with link http://feeds.joomla.org/JoomlaSecurityNewsthis link is broken, so it pop up a error loading feed data error.

Have fun!

Thursday, January 6, 2011

Finding time difference in seconds between 2 dates ( timestamps )


In my situation i needed query to find time difference in seconds between current time and field's value.
SELECT TIME_TO_SEC(TIMEDIFF(NOW(),`field_name`));
between 2 mysql fields can look like this:
 SELECT TIME_TO_SEC(TIMEDIFF(`field_name1`,`field_name2`));

httpd.exe apache cpu 100% load


I had the problem today. When i started Apache from Xampp control panel, CPU usage became 100%. Nothing changed after apache restart and PC restart. Same.. - 100%.

So to understand what is happening you need to 
1. go to: C:\xampp\apache\logs
2. open  access.log with text editor

if file is too big to open ( bigger than 5 mb ) do this:
1. just delete access.log and error.log
2. start apache and stop it after it will start loading your CPU to 100%.

In access.log, you will be able to figure out what is happening with your apache ( httpd ).

In my situation was some kind of apache virus ( which affects my files with new scripts called webdav and webalizer ).
So if you have the folders in your xampp folder, that means you have same problem..

i solved it by this way:
1. -> Control Panel\Network and Internet\Network and Sharing Center
2. -> Windows Firewall
3. -> Allow programs to communicate through Windows Firewall
4. Removed Apache HTTP Server with checked under Public ( To do that press Change settings button on top )
5. Close everything.

It might not help you. So here is one more idea what you could do in the situation:
After finding out what IP requested execution of the script in part with error.log just Block it! Google for answer..

Tuesday, January 4, 2011

Facebook smiles


Here is collection of all smiles which are possible in facebook.


Happy emote: :) or :-)
facebook smiley happy
Really happy emote: :D or :-D
facebook smiley sad
Sad: :( or :-(
facebook smiley crying
Crying emote: :’(

facebook smiley wink
Wink emote: ;) or ;-)
facebook smiley happy eyes
Happy eyes: ^_^
facebook smiley laughing eyes
Laughing eyes: >:o
facebook smiley cat smile
Cat smile: :3
facebook smiley grumpy
Grumpy: >:-(
facebook smiley shocked
Shocked emote: :o or :-o
facebook smiley glasses
Glasses emote: 8) or 8-)
facebook smiley cool shades
Cool shades: 8-|
facebook smiley rude
Rude: :p or :-p
facebook smiley woot
Woot?!: O.o
facebook smiley dork
Dork emote: -_-
facebook smiley duhhh
Duhhh emote: :/ or :\
facebook smiley devil
Devil emote: 3:)
facebook smiley angel
Angel emote: O:)
facebook smiley kiss
Kiss emote: :-* or :*
facebook smiley love
Love emote: <3
facebook smiley pacman
Pacman: :v
facebook smiley shark
Shark: (^^^)
facebook smiley robot
Robot: :|]
facebook smiley weird face putnam
Weird guy’s face: :putnam:

Other symbols which also can be "copy-pasted" into facebook


¢ – cent
£ – pound
¤ – currency
¥ – yen
€ – euro sign
§ – section
© – copyright
® – registered trademark
™ – trademark
° – degree – e.g. 45°
¹ – superscript 1
² – superscript 2
³ – superscript 3
· – middle dot
¸ – spacing cedilla
¼ – fraction 1/4
½ – fraction 1/2
¾ – fraction 3/4
¿ – inverted question mark
× – multiplication
÷ – division
• – bullet = black small circle
◊ – lozenge
℠ – Service Mark
✓ – check mark
✔ – heavy check mark
✕ – multiplication sign
✖ – heavy multiplication sign
✗ – ballot
✘ – heavy ballot
✝ – Latin Roman Cross
✞ – Latin Cross 3D shadow
✟ – Latin Cross outline
✠ – Maltese Cross
✡ – Star of David
❛ – quotation mark single turned comma
❜ – quotation mark single comma
❝ – quotation mark double turned comma
❞ – quotation mark double comma
℃ – Celsius
℅ – care of
℉ – Farenheit
№ – numero symbol – number sign
℗ – Sound Recording Copyright
℞ – Prescription Take pharmaceutical symbol
Ω – Ohm
℧ – Inverted Ohm
☀ – sunshine – sun
☁ – cloudy – cloud – dark cloud
☂ – raining – rain – umbrella
☃ – snow – snowman
☄ – shooting star
★ – star solid
☆ – star outline
☇ – lightning
☈ – thunderstorm
☉ – sun
☊ – ascending node
☋ – descending node
☌ – conjunction
☍ – opposition
☎ – phone
☏ – phone symbol outline
☐ – check box
☑ – check box check mark
☒ – ballot box with X
☓ – St. Andrew’s Cross
♔ – White King
♕ – White Queen
♖ – White Rook
♗ – White Bishop
♘ – White Knight
♙ – White Pawn
♚ – Black King
♛ – Black Queen
♜ – Black Rook
♝ – Black Bishop
♞ – Black Knight
♟ – Black Pawn
☚ – left-pointing index finger
☛ – right-pointing index finger
☜ – left-pointing index finger
☝ – upwards pointing index finger
☞ – right pointing index finger
☟ – downwards pointing index finger
☠ – skull & crossbones
☡ – caution sign
☢ – radioactive sign
☣ – biohazard sign
☮ – peace sign
☯ – yin & yang
☹ – frowning face
☺ – smiley face
☻ – black smiley face
☽ – waxing crescent moon
☾ – waning crescent moon
♈ – Aries
♉ – Taurus
♊ – Gemini
♋ – Cancer
♌ – Leo
♍ – Virgo
♎ – Libra
♏ – Scorpio
♐ – Sagitarius
♑ – Capricorn
♒ – Aquarius
♓ – Pisces
♠ – black spade suit
♢ – red diamond suit
♣ – black club suit = shamrock
♤ – red spade suit
♥ – black heart suit = valentine ( <3 )
♦ – black diamond suit
♧ – red club suit
♨ – hot springs
♩ – musical quarter note
♪ – musical eighth note
♫ – musical single bar note
♬ – musical double bar note
♭ – flat note
♮ – natural note
♯ – sharp note
✁ – cut above
✂ – cut here
✃ – cut below
✄ – scissors
✆ – public pay phone
✇ – film reel – tape spool
✈ – airport jet airplane
✉ – envelope mail email
✌ – victory sign
✍ – signature – sign here
✎ – pencil diagonal down
✏ – pencil
✐ – pencil diagonal up
✈♬☑ ☎ ☒ ☻ ♤ ☤☹♀ ✩✉ ✇♺✖♨ ❦☁ ✌♛ ❁☪ ☂✏♝ ❀ ☭☃☛♞ ✿ ☚ ♘✾ ☯☾☝♖✽ ✝☄☟♟✺ ☥✂ ✍♕✵ ☮☠ ❤☆ ★ ♫ ✔ ► Ω ッ ● ♣ ♪ ☼ ◄ ❥ ♂♀ ♪◘♠☻♣ ♦☺○ ¿ ❤ ☆ ★

Also meaning of the article could be like this:
Facebook smile, Facebook smileys, Facebook, Smileys, Facebook Smiles