My ps3 controller doesnt Charge, ive tried plugging it into my ps3 and my PC it doesnt charge, The PlayStation Can be turned on and it can still charge right?

Edit: Nevermind It was the USB Cord i was Using

Edit 2: It still isnt charging it was charging for about 3 hours then it stopped the ****?

It was working, it charged 1 bar then it stopped, what the ****? how long does it take for the Battery inside the Controller to stop charging do you think?