Lock the camera's Y position in BGE?
Instead of parenting the Camera to the Player, use this code to copy the location of the Player to the location of the Camera:

import bge
import GameLogic as g
cont = g.getCurrentController()
own = cont.owner
scene = g.getCurrentScene()

player = scene.objects["Player"]
camera = scene.objects["Camera"]

loc = player.position
x = loc[0]
y = loc[1]
z = loc[2]

own.worldPosition = [x, y, z]


Since you don't want it to move on every axis along with the Camera, i would simply fill in each axis in the own.worldPosition = [x, y, z] line that you dont want to be changed with the camera's actual location. For example my line reads own.worldPosition = [x, -30, 5.8]. This keeps the Camera locked on the y and z axes while copying the x location of the Player. Hope this helped. :)