"sql <-> php <-> js <-> php <-> sql" chain complete