- "REPLACE INTO photo SET uid={?}, attachmime = {?}, attach={?}, x={?}, y={?}",
- $user->id(), $mimetype, $data, $x, $y);
+ "REPLACE INTO profile_photos SET pid={?}, attachmime = {?}, attach={?}, x={?}, y={?}",
+ $user->profile()->id(), $mimetype, $data, $x, $y);