The connectors on the cable match according to specification, the iPhone will thus be detected on the computer, but not via the computer or AC adapter charging.
A USB charging cable is really nothing complicated! Too bad that you meet yourself in this product category on scrap deals.