        AND table_name = '{}';", table_name);

        let table_exists = conn.query_map(
            if_exist,
            |count: usize| {
                count
            }
        ).unwrap();

        match & table_exists[0] {
            0 => Ok(false),
            1 => Ok(true),
            _ => Err(mysql::Error::MySqlError(MySqlError {  message: "Error in fetching the table status".to_string(), state: "MySqlError".to_string(), code: 1004 }))
        }
    }