void  setSelectDb(struct conn *conn,struct server *server){
         ASSERT(!conn->client && conn->connected )
         int n, i;
         char selectCommand[25];
         sprintf(selectCommand,"*2\r\n$6\r\nSELECT\r\n$1\r\n%d\r\n",server->owner->select);
         
		 n = write(conn->sd,selectCommand,strlen(selectCommand));
		 if (n < 0) {
			 log_error("ERROR selecting db on  socket for socket %d-> error %d ", conn->sd, strerror(errno) );
			 conn->err = errno;
		 }

I am really not sure about this  so i want to ask you if this will do the needful