



I only want the view to be created for ONLY that user at that specific connection, and DROP as soon as the connection is gone. I do not want them to have DROP permissions, as the directory user will be in a PHP file owned by apache, and they arent restricted to it using dir- so they could just view the user and pass.Īlso, I dont wan't a user to just use bob_rooms when he is actually joe. Where the user "directory" has to have SELECT, CREATE VIEW and DROP permissions ( DROP is required because of the or REPLACE). Mysql_query("CREATE or REPLACE VIEW _online_servers AS SELECT * FROM online_servers WHERE palace = '$user'") or die(mysql_error()) Mysql_select_db("directory", $conn) or die(mysql_error()) I am doing views as such (I am sure this could be optimized):ĭb.php that gets included: $conn = mysql_connect("localhost","directory","dghgffhghf") or die(mysql_error()) Allow users only certain information from database
